Session state

J

JMMB

The following code works fine when testing with the help web page, but it
doesn't work when running from the client application. Anybody knows what
could be the problem here? thanks a lot.
JMMB

[WebMethod(EnableSession=true)]
public string CreateSession()
{
Session["nome"] = "Marcelo";
return Session["nome"].ToString();
}

[WebMethod(EnableSession=true)]
public string ReadSession()
{
if(Session["nome"] != null)
return Session["nome"].ToString();
else
return "expired";
}

[WebMethod(EnableSession=true)]
public void AbandonSession()
{
Session.Abandon();
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top