The simple trick is to enable the Session State before using it directly. This can be done by using the following attribute
[WebMethod(EnableSession = true)] // C#
<WebMethod(EnableSession:=true)> // VB .Net
Once you specify these lines over your web method you can use the session object naturally.

0 comments:

Post a Comment