[Mono-list] ASP.NET - WebServices - EnableSession property not supported ?

Guillaume Mouron gmo.lists at gmail.com
Thu Mar 8 03:38:43 EST 2007


On 3/6/07, Guillaume Mouron <gmo.lists at gmail.com> wrote:
>
> Hi,
>
> I am trying to create a webservice (.asmx file) with session enabled by
> using the property "EnableSession = true".
> My project is built under Visual Studio 2005 SP1 and deployed to the SuSE
> 10.2 VMWare image provided by the Mono project (with Mono 1.2.3.1).
> So, to be clear, the dll is not compiled by the mono compiler.
> Unfortunately, I have an exception at execution time.
>
> I made a simple test case :
>
> ----------------------------- .asmx file
> -----------------------------------------
> <%@ WebService Language="C#" CodeBehind="~/App_Code/TestEnableSession.cs"
> Class="TestEnableSession" %>
> --------------------------------------------------------------------------------------
>
>
>
> ----------------------------- .cs file
> -----------------------------------------
> using System;
> using System.Web;
> using System.Collections;
> using System.Web.Services;
> using System.Web.Services.Protocols;
>
> /// <summary>
> /// Summary description for TestEnableSession
> /// </summary>
> [WebService(Namespace = "http://tempuri.org/")]
> [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
> public class TestEnableSession : System.Web.Services.WebService {
>     public TestEnableSession () {
>         //Uncomment the following line if using designed components
>         //InitializeComponent();
>     }
>
>     [WebMethod(Description = "EnableSession = false", EnableSession =
> false)]
>     public string HelloWorldFalse()
>     {
>         return "Hello World";
>     }
>
>     [WebMethod(Description = "EnableSession = true", EnableSession =
> true)]
>     public string HelloWorldTrue()
>     {
>         return "Hello World";
>     }
> }
>
> -------------------------------------------------------------------------------------
>
> When I use the web interface provided by mono, the HelloWorldFalse method
> is performing correctly.
> But the HelloWorldTrue method is rising this exception :
>
> ---------------------------- stack trace
> ---------------------------------------
> <!--
> System.Web.HttpException:  ---> System.NullReferenceException
> : Object reference not set to
>       an instance of an object
>   at System.Web.SessionState.SessionStateModule.CreateContainer (
> System.String sessionId,
>         System.Web.SessionState.SessionStateStoreData
>  data, Boolean isNew, Boolean isReadOnly)
>         [0x00000]
>   at System.Web.SessionState.SessionStateModule.OnAcquireRequestState (
> System.Object o,
>          System.EventArgs args) [0x00000]
>   at (wrapper delegate-invoke)
> System.MulticastDelegate:invoke_void_object_EventArgs (object,
>        System.EventArgs)
>   at System.Web.HttpApplication+<>c__CompilerGenerated2.MoveNext () [0x00000] --- End of
>
>         inner exception stack trace ---
> -->
>
> --------------------------------------------------------------------------------------
>
> Is there something wrong on my side ? (note that this is working correctly
> with the Visual Studio 2005 embedded Asp Server)
> Should I fill a bug report ?
>
> Thanks,
> Guillaume Mouron



Hi,

I compiled the same files with the mono compiler and the same error occurs.
I will fill a bug report.

Guillaume Mouron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070308/779d4756/attachment.html 


More information about the Mono-list mailing list