开发者

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

开发者 https://www.devze.com 2022-12-27 01:08 出处:网络
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!

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/questio开发者_运维知识库n 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!!


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

[WebMethod(EnableSession=true)]
0

精彩评论

暂无评论...
验证码 换一张
取 消