views:

612

answers:

2

If I access session variable in ashx handler through it is always null. How can I access the current user here.

public void ProcessRequest (HttpContext context) {
        context.Session[UIConstants.SessionItems.ID] = Id;
    }
+3  A: 

You have to "implement" either IRequiresSessionState or IReadOnlySessionState, with former providing full access to session, and the latter providing read-only access.

I'm quoting "implement" here because these two are so-called "marker interfaces", which means they have no members.

Anton Gogolev
+1  A: 

However it is not working in FireFox. Is there any fix suggested for this issue?

hash
Do you have cookies enabled for ur browser?
Amitabh
yes it is enabled. It doesnt work in any other browser except IE.
hash