Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

Sending SessionID

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
news.rz.uni-karlsruhe.de - 03 Apr 2008 17:05 GMT
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) - 03 Apr 2008 18:05 GMT
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.

Signature

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!

*************************************************
> Up to now I call webmethods from clientside with he "EnableSession = true"
> switch on.
[quoted text clipped - 10 lines]
>
> R4DIUM
Axel Gallus - 04 Apr 2008 09:55 GMT
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

> If you are not enabling session, how do you create a session ID?
>
[quoted text clipped - 21 lines]
>>
>> R4DIUM
Peter Bromberg [C# MVP] - 03 Apr 2008 20:40 GMT
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

> Up to now I call webmethods from clientside with he "EnableSession = true"
> switch on.
[quoted text clipped - 10 lines]
>
> R4DIUM

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.