In order to use Session variable in asp.net web service you need to add
EnableSession=true attribute in web method definition.
[WebMethod(EnableSession=true)]
public void HelloUser()
{
return "Hello " + Convert.ToString(Session["LoggedInUser"]);
}
EnableSession=true attribute in web method definition.
[WebMethod(EnableSession=true)]
public void HelloUser()
{
return "Hello " + Convert.ToString(Session["LoggedInUser"]);
}
it will fetch session from site from where we are calling web service ?
ReplyDelete