Session state

Discussion in 'ASP .Net Web Services' started by JMMB, May 18, 2005.

  1. JMMB

    JMMB Guest

    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();
    }
    JMMB, May 18, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shamanthakamani
    Replies:
    1
    Views:
    3,467
    Natty Gur
    Nov 20, 2003
  2. Not Liking Dot Net Today
    Replies:
    0
    Views:
    587
    Not Liking Dot Net Today
    Apr 21, 2004
  3. Maciek
    Replies:
    0
    Views:
    8,219
    Maciek
    Sep 15, 2005
  4. jnickfl1
    Replies:
    0
    Views:
    564
    jnickfl1
    Sep 18, 2006
  5. Harry Haller
    Replies:
    0
    Views:
    1,636
    Harry Haller
    Nov 7, 2006
Loading...

Share This Page