Skip to main content

How to get session value in your ashx file, or Object refrence error under ashx code when using session

Add the following line with your class name
System.Web.SessionState.IRequiresSessionState

Example
public class UploadHandler : IHttpHandler, System.Web.SessionState.IRequiresSessionState

for getting the session value

use this context.Session["yourstring"].toString();

I hope it helps you 

Comments