Thursday, July 31, 2008

Session is null in ashx

If the HttpContext.Current.Session is null in your .ashx handler, add System.Web.SessionState.IReadOnlySessionState to your class declaration, like this:
public class MyHandler : IHttpHandler, System.Web.SessionState.IReadOnlySessionState

That's it!

1 comments:

Fred said...

Many thanks. I search all google for this information rsrs.