[Mono-list] Error in web service method.

Lluis Sanchez lluis@ximian.com
Tue, 20 Jul 2004 17:25:41 +0200


Hi

The first thing you should do is to simplify a bit the test case. You
are getting a null reference exception, but it is not clear if it is due
to the web service infrastructure, or to the database access. Once you
have it, please file a bug report in bugzilla.ximian.com and attach the
test case.

Thanks,
Lluis.

On dt, 2004-07-20 at 15:38, beniniva@csr.unibo.it wrote:
> Hi,
> the C# sintax is correct, on windows it works well.
> Maybe the problem is in SessionState Object, I dont' know....
> 
> Can anybody help me?
> 
> thanks,
> 
> Valentina.
> 
> >Scrive Tizio Incognito <tizioincognito@tiscali.be>:
> 
> > beniniva@csr.unibo.it said the following on 20/07/2004 10.52:
> > 
> > >Hi,
> > >when I try to test the web service LoginService.asmx
> > >(http://localhost/mono/LoginService.asmx), the method "Login" and "LogOut"
> > go
> > >well, instead "TestLogin" give me only this message:
> > >---------------------
> > >The remote server returned an error: (500) Internal Server Error.
> > >Object reference not set to an instance of an object
> > >----------------------
> > >
> > >  
> > >
> > [SNIP]
> > 
> > >		//TEST LOGIN
> > >		//Metodo che verifica il contenuto della variabile di Sessione "Login"
> > >		[WebMethod (EnableSession=true)]
> > >		public string TestLogin ()
> > >		{
> > >			//se la variabile di sessione non  vuota, significa che l'utente si 
> > logato, quindi recupero alcuni dati su di lui, ad esempio il "ruolo
> > aziendale"
> > >			if ((string)Session["Login"]!= null)
> > >  
> > >
> > Ciao Valentina,
> > 
> > I don't know exactly how it works with C#, but I think you may check if 
> > Session["Login"] is *nothing* instead of null (however, this is how it 
> > works with VB)
> > 
> > --
> > T.I.
> > 
> > _______________________________________________
> > Mono-list maillist  -  Mono-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> > 
> 
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list