Ajax and Session when WebServices called from client site

Last post 02-26-2007 10:16 AM by AlexanderQX. 2 replies.

Sort Posts:

  • Ajax and Session when WebServices called from client site

    02-26-2007, 7:34 AM
    • Loading...
    • AlexanderQX
    • Joined on 02-24-2007, 12:18 PM
    • Posts 3

    I have been trying to find a solution for session state and AJAX web service calls. I have a simple page that reports different session id than the web service called from AJAX client site.  There are lots of discussions of this topic but no real answers.

    Am I lost? Is it that each web service calls from the client site are associated always different session?

    How can I limit the web services to be called from client when they don’t have session in server?

    Or is this something I have to do by using the AJAX authentication services?

    What about if webservice needs to access the session state variables how this can be accomplished as they have different session ids?

    Regards,

    Alexander

  • Re: Ajax and Session when WebServices called from client site

    02-26-2007, 9:43 AM
    Answer
    • Loading...
    • Rama Krishna
    • Joined on 01-24-2006, 9:33 PM
    • Atlanta, GA
    • Posts 307

    A unique session ID and a session object is not associated with a session until a session variable is added to the Session. You should assign to and create at least one session variable like following:

    Session["__Dummy"] = "Some Value";

    After you do this the session Id will remain constant for the session.

  • Re: Ajax and Session when WebServices called from client site

    02-26-2007, 10:16 AM
    • Loading...
    • AlexanderQX
    • Joined on 02-24-2007, 12:18 PM
    • Posts 3

    Yes, that was the magic... solved my problem.

    Thanks...

Page 1 of 1 (3 items)
Microsoft Communities
Page view counter