[Mono-devel-list] Problem with Session's and Web Services

Sam Hamilton shamilton at javtech.com
Thu Dec 18 13:29:46 EST 2003

Hi All,

I am somewhat of a noob to the mono world, but I have been loving it
since getting everything up and running. I have an application I am
working on that is running on mono via mod_mono. I couldn't be happier
with the progress I have made in the last day or so. However, I have hit
a bit of a snag. I need to be able to manage a session with a Web
Service and no matter what I do I can't get it to work.


Even the simplest class below fails for me: (This is all running on Mono
0.29 and mod_mono from cvs)



// MyService.cs


using System;

using System.Web.Services;


namespace foo {


            [WebService (Description="Foo Time") ]

            public class MyService : System.Web.Services.WebService {


                        [WebMethod (EnableSession=true) ]

                        public bool testService ( string a ) {

                                    If ( a == "foo" ) {

                                                Session["foo"] = "bar";

                                                return true;

                                    } else {

                                                return false;








<@ WebService Language="c#" Codebehind="MyService.cs"
Class="foo.MyService" %>


This always results in the error: "A null value was found where an
object instance was required".


Any help would be greatly appreciated.



Sam Hamilton




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20031218/9d7aa5a1/attachment.html 

More information about the Mono-devel-list mailing list