Need to access session variables in an ashx?

Just a quick note if you need to access session variables from an ashx, you need to implement SessionState.IRequiresSessionState or IReadOnlySessionState if you only need to read the vars

In your ashx change

Public Class yourclass :     Implements IHttpHandler

    Implements SessionState.IRequiresSessionStat

to

Public Class yourclass

Implements IHttpHandler

    Implements SessionState.IRequiresSessionStat

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.