[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


WebServices and Session

Posted on 2011-10-14
Medium Priority
Last Modified: 2012-05-12

Please forgive the dumb question, but if a WebService is written under the same namespace as a WebForm -- can the WebService pass the Session variable to a static class that does the work?

What's happening is I am calling a web service from client using jQuery ajax / JSON and passing a bunch of info.

The webservice webmethod then calls a method in a static class, said method needs to put some data into Session, but I guess it can't.  Session is not recognized.

Are there workarounds?
Question by:Tom Knowlton
  • 2

Assisted Solution

regevha earned 200 total points
ID: 36971581
If I understand you correctly, your question is about an ASP.NET Web Service (provider). In order to understand your question more clearly, please attach .NET code sample of the Web Service.

Author Comment

by:Tom Knowlton
ID: 36971632
I think I may have figured it out.

Give me a little while and I'll come back and report on what I found.

Accepted Solution

gopaltayde earned 1800 total points
ID: 36973042
have you set the attribute [WebMethod(EnableSession = true)] to the webmethod?

Author Closing Comment

by:Tom Knowlton
ID: 36980236
>>>>have you set the attribute [WebMethod(EnableSession = true)] to the webmethod?

Nope, but when I did, it began working...thx!!!

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month19 days, 1 hour left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question