Sending SessionID

Sending SessionID

am 03.04.2008 18:05:26 von Axel Gallus

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

Re: Sending SessionID

am 03.04.2008 19:05:55 von NoSpamMgbworld

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" wrote in message
news:ft2us0$cjv$1@news2.rz.uni-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
>
>

RE: Sending SessionID

am 03.04.2008 21:40:02 von pbromberg

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

Re: Sending SessionID

am 04.04.2008 10:55:22 von Axel Gallus

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:OIB08zalIHA.5660@TK2MSFTNGP02.phx.gbl...
> 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" wrote in message
> news:ft2us0$cjv$1@news2.rz.uni-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
>>
>>
>
>