I have an ashx handler and I would like to check that the user trying to access it through a JSON call actually has a forms Authenticated session. Is this possible?
Asked
Active
Viewed 1,579 times
2 Answers
1
You can check in your handler code if the user is authenticated. The auth cookie will be passed along with your ajax request.
public void ProcessRequest(HttpContext context)
{
if (!context.Request.IsAuthenticated)
{
// 401 response
}
// authenticated
}

Dallas
- 2,217
- 1
- 13
- 13
1
Turns out uploadify doesnt pass the session properly I posting this question so everyone can see!
The answer is here: