5
Ich versuche, diese Reihe zu werfen von Global Application_Error ASAXWurf http Ausnahme (Unauthorized) von Application_Error
throw new HttpException((int)HttpStatusCode.Unauthorized, "Forbidden");
Aber aus irgendeinem Grund erhalte ich 200 und nicht 401 im Browser, wissen Sie, warum?
Update:
protected void Application_Error(object sender, EventArgs e)
{
throw new HttpException((int)HttpStatusCode.Unauthorized, "Forbidden");
}
Haben Sie Formulare auth. in web.config aktiviert? Wenn Sie die Formularauthentifizierung in web.config aktiviert haben, kann dieses Verhalten auftreten. – VJAI
@Mark, Danke, aber nein, ich nicht. – Shazam
PLZ posten Sie Ihre Application_Error – VJAI