i want to chek is the user is loggedin before hitting the ajax request or i want to chek in ajax handler(ashx file)
i have httpContext there in ashx file can i chek thru dis?
i want to chek is the user is loggedin before hitting the ajax request or i want to chek in ajax handler(ashx file)
i have httpContext there in ashx file can i chek thru dis?
In your IHttpHandler
(.ashx handler) handler make it implement the IReadOnlySessionState
or IRequiresSessionState
(if it needs to set anything) interfaces, like this:
public class MyHandler : IHttpHandler, IReadOnlySessionState
{
public void ProcessRequest(HttpContext context)
{
//You can use session here
}
public bool IsReusable { get { return true; } } //this may vary for you
}