[Mono-list] Problems with Sessions in xsp2 ???

Josef Semmler josef.semmler at gmail.com
Mon May 7 07:20:03 EDT 2007


Hello,

might be somebody can help me!

I'm trying to run a simple webservice which is using sessions.
The webservice basically looks like this:

namespace WebServiceTests
{
    public class TestService : System.Web.Services.WebService
    {
        [WebMethod(EnableSession = true)]
        public int Echo (int a)
        {
            int b = 0;
            if ( Session["value"] != null ) {
                Int16 i = ((Int16)Session["value"]);
                b = i;
            }

            Session.Add("value", Int16.Parse(a + ""));

            return b;
        }

    }
}

(the service is always storing the submitted value and returning it the next
time as result).

This webservice runs without any problems using xsp ... but fails when using
xsp2 - then it returns an exception:
System.NullReferenceException
: Object reference not set to an instance of an object<br/>  at
      System.Web.SessionState.SessionStateModule.CreateContainer  (
System.String sessionId,
      System.Web.SessionState.SessionStateStoreData
 data, Boolean isNew, Boolean isReadOnly)
      [0x00000] <br />  at
System.Web.SessionState.SessionStateModule.OnAcquireRequestState (
     System.Object o, System.EventArgs args) [0x00000] <br />
  at (wrapper delegate-invoke)
      System.MulticastDelegate:invoke_void_object_EventArgs (object,
System.EventArgs)<br />  at
      System.Web.HttpApplication+
<>c__CompilerGenerated5.MoveNext () [0x00000]
Sometimes i just get a timeout ...

Is this a known problem? Or am i doing something completely stupid?

Thanks for any help!

PS: I'm using mono 1.2.3 under windows xp and mono 1.2.3 under centos 4.
Both installation behave the same way
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070507/7e234248/attachment.html 


More information about the Mono-list mailing list