Is it possible to share session state between asp.net aspx page making a call to an asp.net webservice

StackOverflow https://stackoverflow.com/questions/2659905

Question

My Situation:

I have 1 asp.net application with both aspx pages AND webservices

I make calls (using ajax) to the webservice from an aspx page - all within the same asp.net application!

Here is my problem/question Is there any way to share the session state?

I.e. - the aspx page has a sessionID and the state is being maintained. When the call to the webservice is made, is there a way to automatically send the seesionID to the webservice and then be able to access the same session state from the webservice?

--

That would greatly simplify my work! :) Many thanks for your ideas!!

Was it helpful?

Solution

You should add the EnableSession property to the WebMethod attribute on your web service methods:

[WebMethod(EnableSession=true)]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top