Sending SessionID

  • Thread starter news.rz.uni-karlsruhe.de
  • Start date
N

news.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
 
C

Cowboy \(Gregory A. Beamer\)

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

Peter Bromberg [C# MVP]

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
 
A

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top