Sending SessionID

Discussion in 'ASP .Net' started by news.rz.uni-karlsruhe.de, Apr 3, 2008.

  1. Up to now I call webmethods from clientside with he "EnableSession = true"
    switch on.

    What I want to do is call the webmethod without "EnableSession = true" but
    instead
    deliver the SessionID from the client as a parameter e.g.
    mywebmethod(SessionID) and
    than find the data which belongs to the SessionID on my own on the server.

    How can I access the stored SessionID on the client?


    Regards

    R4DIUM
    news.rz.uni-karlsruhe.de, Apr 3, 2008
    #1
    1. Advertising

  2. If you are not enabling session, how do you create a session ID?

    Think it through for a second. You have the option, if you desire (or have
    to) to create your own "session mechanism" where you pass a temporary token
    that is retrieved on each hit to the web service. You end up having to
    handle session lifetime and other infrastructure, but it is a doable thing.

    --
    Gregory A. Beamer
    MVP, MCP: +I, SE, SD, DBA

    Subscribe to my blog
    http://gregorybeamer.spaces.live.com/lists/feed.rss

    or just read it:
    http://gregorybeamer.spaces.live.com/

    *************************************************
    | Think outside the box!
    |
    *************************************************
    "news.rz.uni-karlsruhe.de" <-karlsruhe.de> wrote in message
    news:ft2us0$cjv$-karlsruhe.de...
    > Up to now I call webmethods from clientside with he "EnableSession = true"
    > switch on.
    >
    > What I want to do is call the webmethod without "EnableSession = true" but
    > instead
    > deliver the SessionID from the client as a parameter e.g.
    > mywebmethod(SessionID) and
    > than find the data which belongs to the SessionID on my own on the server.
    >
    > How can I access the stored SessionID on the client?
    >
    >
    > Regards
    >
    > R4DIUM
    >
    >
    Cowboy \(Gregory A. Beamer\), Apr 3, 2008
    #2
    1. Advertising

  3. The only thing stored on the client (assuming cookies are enabled) that
    relates to a Server side Session is the SESSION cookie. If you can figure out
    how to get the correct cookie name and extract the SessionID from it, that
    would accomplish your goal.

    However, with a Webservice you are far better off passing this type of
    token information at the message level, either with a custom SoapHeader or
    via a specific element in the SOAP Request.
    -- Peter
    Site: http://www.eggheadcafe.com
    UnBlog: http://petesbloggerama.blogspot.com
    Short Urls & more: http://ittyurl.net


    "news.rz.uni-karlsruhe.de" wrote:

    > Up to now I call webmethods from clientside with he "EnableSession = true"
    > switch on.
    >
    > What I want to do is call the webmethod without "EnableSession = true" but
    > instead
    > deliver the SessionID from the client as a parameter e.g.
    > mywebmethod(SessionID) and
    > than find the data which belongs to the SessionID on my own on the server.
    >
    > How can I access the stored SessionID on the client?
    >
    >
    > Regards
    >
    > R4DIUM
    >
    >
    >
    Peter Bromberg [C# MVP], Apr 3, 2008
    #3
  4. news.rz.uni-karlsruhe.de

    Axel Gallus Guest

    Sessions are enabled - ASP.Net handles the session stuff.
    All I want to avoid is automatically transfering all session stuff when
    calling a webmethod.
    "EnableSession" refers to the flag of the webmethod not of any config file.
    I read that the performance is better if you only transmit what is
    neccessary when calling a webmethod
    and thats just the SessionID in my case.

    So ASP.Net stores a cookie on the client pc which holds the SessionID.
    All I want to know now is how can I read the SessionID from that cookie on
    the client.

    Regards

    R4DIUM



    "Cowboy (Gregory A. Beamer)" <> schrieb im
    Newsbeitrag news:...
    > If you are not enabling session, how do you create a session ID?
    >
    > Think it through for a second. You have the option, if you desire (or have
    > to) to create your own "session mechanism" where you pass a temporary
    > token that is retrieved on each hit to the web service. You end up having
    > to handle session lifetime and other infrastructure, but it is a doable
    > thing.
    >
    > --
    > Gregory A. Beamer
    > MVP, MCP: +I, SE, SD, DBA
    >
    > Subscribe to my blog
    > http://gregorybeamer.spaces.live.com/lists/feed.rss
    >
    > or just read it:
    > http://gregorybeamer.spaces.live.com/
    >
    > *************************************************
    > | Think outside the box! |
    > *************************************************
    > "news.rz.uni-karlsruhe.de" <-karlsruhe.de> wrote in message
    > news:ft2us0$cjv$-karlsruhe.de...
    >> Up to now I call webmethods from clientside with he "EnableSession =
    >> true" switch on.
    >>
    >> What I want to do is call the webmethod without "EnableSession = true"
    >> but instead
    >> deliver the SessionID from the client as a parameter e.g.
    >> mywebmethod(SessionID) and
    >> than find the data which belongs to the SessionID on my own on the
    >> server.
    >>
    >> How can I access the stored SessionID on the client?
    >>
    >>
    >> Regards
    >>
    >> R4DIUM
    >>
    >>

    >
    >
    Axel Gallus, Apr 4, 2008
    #4
    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. Shankar Reddy

    Validate SessionID

    Shankar Reddy, Sep 2, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,744
    Jonathan Allen
    Sep 25, 2004
  2. Robb Smith
    Replies:
    2
    Views:
    570
    Saravana
    Jul 18, 2003
  3. Ronald
    Replies:
    6
    Views:
    6,930
    Andy Mortimer [MS]
    Feb 23, 2004
  4. Replies:
    0
    Views:
    1,356
  5. Luke
    Replies:
    2
    Views:
    4,705
    Nigel Wade
    Mar 15, 2007
Loading...

Share This Page