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. Advertisements

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,768
    Natty Gur
    Nov 20, 2003
  2. Jeff Smythe
    Replies:
    3
    Views:
    1,544
    Jeff Smythe
    Jan 2, 2004
  3. Not Liking Dot Net Today
    Replies:
    0
    Views:
    892
    Not Liking Dot Net Today
    Apr 21, 2004
  4. Maciek
    Replies:
    0
    Views:
    8,562
    Maciek
    Sep 15, 2005
  5. jnickfl1
    Replies:
    0
    Views:
    818
    jnickfl1
    Sep 18, 2006
  6. Harry Haller
    Replies:
    0
    Views:
    1,841
    Harry Haller
    Nov 7, 2006
  7. archana
    Replies:
    0
    Views:
    509
    archana
    Mar 13, 2007
  8. dm1608
    Replies:
    3
    Views:
    2,656
    bruce barker
    Dec 19, 2009
Loading...