RicksAtWork
Programmer
In my global asax I have:
protected void Global_AcquireRequestState(Object sender, EventArgs e)
{
// set the security principal to our BusinessPrincipal
if(Session["CSLA-Principal"] != null)
{
Thread.CurrentPrincipal = (IPrincipal)Session["CSLA-Principal"];
HttpContext.Current.User = Thread.CurrentPrincipal;
}
}
If I navigate to a webservice, I get the error:
Session state is not available in this context.
I need the session code in my global.asax file for the rest of my site, but it seems to be causing issues with webservices
What am I doing wrong?
protected void Global_AcquireRequestState(Object sender, EventArgs e)
{
// set the security principal to our BusinessPrincipal
if(Session["CSLA-Principal"] != null)
{
Thread.CurrentPrincipal = (IPrincipal)Session["CSLA-Principal"];
HttpContext.Current.User = Thread.CurrentPrincipal;
}
}
If I navigate to a webservice, I get the error:
Session state is not available in this context.
I need the session code in my global.asax file for the rest of my site, but it seems to be causing issues with webservices
What am I doing wrong?