[Mono-list] Session problem with mod_mono
Mike Leahy
mgleahy at alumni.uwaterloo.ca
Tue Jul 3 13:39:16 EDT 2007
Hello again,
I've reproduced this same problem again on WinXP with the latest
Apache/mod_mono/Mono setup. I also found an old bug where someone
reported the same problem I'm having, but it was ultimately determined
to be 'not a bug':
http://bugzilla.ximian.com/show_bug.cgi?id=73203
So...my question is if this is not a bug, then what might I be doing
wrong in my configuration? All I've really done to cause the problem is
add the sessionState node in the web.config file with cookieless="true".
Clearly I've missed some other key step. Any recommendations?
Regards,
Mike
Mike Leahy wrote:
> Hello list,
>
> I have what I hope is an easy-to-solve problem. I'm just getting
> started using mod_mono. I'm trying to see if I can get a WebService
> running with cookieless sessions. I added a method to TestService.asmx
> from the xsp test samples, that looks as follows:
>
> [WebMethod(EnableSession=true)]
> public int TestSession ()
> {
> int x = 0;
> if (Session["x"] != null)
> {
> x = (int)Session["x"];
> x++;
> Session["x"] = x;
> }
> else
> {
> Session["x"] = 0;
> }
> return x;
> }
>
> If I add <sessionState mode="InProc" cookieless="false"/> to the
> system.web section of the web.config file, it works fine, but once I set
> cookieless="true", it fails as follows:
>
> <html>
> <title>Error 404</title><body bgcolor="white"><h1><font
> color="red">Server error in '/monoapps' application</font></h1><hr>
> <h2><font color="maroon"><i>File
> '/monoapps/1.1/webservice/TestService.asmx/TestSession' not
> found.</i></font></h2>
> <b>Description: </b>Error processing request.
> <p>
> <b>Error Message: </b>HTTP 404. File
> '/monoapps/1.1/webservice/TestService.asmx/TestSession' not found.
> <p>
> <hr>
> </body>
> </html>
> <!--
> System.Web.HttpException: File
> '/monoapps/1.1/webservice/TestService.asmx/TestSession' not found.
> at System.Web.StaticFileHandler.ProcessRequest (System.Web.HttpContext
> context) [0x00000]
> at System.Web.HttpApplication+<Pipeline>__1.MoveNext () [0x00000]
> -->
>
> Now, I know the session id is supposed to be in the URL, and it is there
> in the browser, e.g.:
>
> http://localhost/monoapps/(DB271823EA2F4B06CA2461CF)/1.1/webservice/TestService.asmx?page=op&tab=test&op=TestSession&bnd=TestServiceSoap&ext=testform
>
> or:
>
> http://localhost/monoapps/(DB271823EA2F4B06CA2461CF)/1.1/webservice/TestService.asmx/TestSession
>
> If it is of any use, here is the Apache conf file for my monoapps folder
> (which is really just a copy of the xsp test folder):
>
> Alias /monoapps "/var/www/monoapps"
> AddMonoApplications monoapps "/monoapps:/var/www/monoapps"
> MonoServerPath monoapps /usr/bin/mod-mono-server
> MonoPath monoapps
> "/var/www/monoapps:/var/www/monoapps/bin:/var/www/monoapps/1.1:/var/www/monoapps/2.0"
> MonoWapidir monoapps "/var/www/monoapps"
> <Location /monoapps>
> MonoSetServerAlias monoapps
> SetHandler mono
> </Location>
>
> I came across various discussions about a bug that seemed related to
> this kind of problem, but I imagine that it's more likely that I'm just
> missing something in my setup. I've encountered this exact same problem
> with mono-1.1.17 on fc6, and mono-1.2.3 on fc7 (64-bit). Can anyone
> make any suggestions?
>
> If there is a better list for this sort of question, or maybe some
> documentation that clarifies how I should be configuring this, I
> wouldn't mind being pointed in the right direction.
>
> Thanks in advance,
> Mike
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
More information about the Mono-list
mailing list