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 / Web Services / February 2005

Tip: Looking for answers? Try searching our database.

Enable Session state not working.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ken Varn - 01 Feb 2005 14:22 GMT
I have tried to enable session state in my [WebMethod] tag, but it appears
to not be working.  When my web service is called, the session state is not
preserved.  The Web Service is being called from a Windows Form control
assembly.  Is there anything else I need to do to have session state work in
my web service?

Signature

-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------

Amit Wadhwa - 01 Feb 2005 15:37 GMT
Are u making a new web service object everytime you are calling a function.
or that is the same object.

if it is not the same object then evrytime an object is made a new session
is created.

> I have tried to enable session state in my [WebMethod] tag, but it appears
> to not be working.  When my web service is called, the session state is not
> preserved.  The Web Service is being called from a Windows Form control
> assembly.  Is there anything else I need to do to have session state work in
> my web service?
Chris Botha - 01 Feb 2005 16:03 GMT
In addition to enable session state on the server side, you must create a
CookieContainer for the web service on the client side:
myService.CookieContainer = new CookieContainer()
By default the client does not process/support cookies, which are needed on
the server to determine the session ID.
If cookies in your browser is enabled, then running your web service in IE
should produce the expected results.

>I have tried to enable session state in my [WebMethod] tag, but it appears
> to not be working.  When my web service is called, the session state is
[quoted text clipped - 3 lines]
> in
> my web service?

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.