[Mono-list] Error in web service method.

beniniva@csr.unibo.it beniniva@csr.unibo.it
Tue, 20 Jul 2004 15:38:43 +0200


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
>