Daniel Lee

Daniel Lee

  • NA
  • 2
  • 0

C# and webservices

Nov 25 2007 7:29 AM
How can I check if a user's session has timed out and then print a message informing him he has timed out.

For instance this is my web method

Code:
[WebMethod (Description="User registers here.",
                    EnableSession = true)]
public string Register (string name)
{
    Session.Timeout = 20; //20 minutes before timingout
    Session.Add("name",name);
    return "Welcome, "+name;
}


How can i obtain the info that it has timedout and print a message from my client's side?