[Mono-list] SetHandler (and "Failed to get Session object") vs AddHandler Mod_mono 1.0.2
Barbara Plank
barbara@idealnet.com
Fri, 24 Sep 2004 16:10:24 +0200
Hi to all,
I have a big question. I've upgraded my mono installation to Mono 1.0.2.
(Red Hat 9/Apache2/Mod_mono 1.0.2)
I've a web application which run under Mono 1.0, but on 1.0.2 I had some
problems, for example the stylesheet was not rendered properly and when I
tried to access it mod_mono gave me an "Failed to get Session object" error.
Even when I tried to put a simple textfile in the virtual directory which
was handled by mod_mono, I got this session error.... I seemed if as
Mod_mono has locked the file/or some access rights where wrong, but the file
had actually 777.
But, then, after I while I got it to work! What I did? I changed in the
httpd.config the handling of mono:
Instead of using "SetHandler mono" I put "AddHandler mono .aspx .ascx
.config .cs ..." etc and all other asp.net file types and it worked!!! The
images/stylesheet were found and the page was displayed in the way it
should.... but: on the older version of mono (1.0) it worked also with
SetHandler mono!! (So the "session" error was misleading....)
So the questions which aroused to me:
- Should from version 1.0.2 on AddHandler be used instead of SetHandler, so
that Mod_mono only handles the asp.net related files and all other stuff is
handled by apache? Is this intended behavior? (perhaps for performance
reasons?
- There is a warning in the INSTALL file in the source of mod_mono 1.0.2:
"If you don't want mod-mono-server to handle all the files, but only
ASP.NET ones, you can replace the 'SetHandler mono' by:
AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx
but this will break PathInfo."
What does it mean that this will break "PathInfo"?
- in Mono 1.0 the mono module libmod_mono.so was added to the httpd.config
with a LoadModule statement. I found that with Mono 1.0.2 this is done in
the "Include conf.d/*.conf". Why this little change?
Any help? Answers?
Thank you all in advance!!! :)
Barbara