I have a custom handler and in some cases, I want to indicate to the user agent that they are not authorized (Http Error Code 401)
if (!IsAuthorized(context))
{
context.Response.StatusCode = 401;
context.Response.End();
return;
}
When I access my handler, I am actually getting a 302 and a redirect to the forms authentication page. Is there a way to stop this from happening?