On Jan 30, 1:11 pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.yabbadabbadoo.comwrote:
1) No. In Windows Authentication, the browser automatically transmits the
credentials the user supplied when they logged into their machine. You either
get authenticated or you don't.
2) Look into the Custom Error Pages with web.config. I have never done it,
but you could probably provide a page for the Windows Auth Unauthorized error.
Peter
Peter, that is right, however you can tell to client browser, that
Response.StatusCode=401
and ask for login and password again.
To redirect an unauthorized request you can do following coding in
your global.asax
Sub Application_EndRequest(ByVal sender As Object, ByVal e As
EventArgs)
If Response.StatusCode = 401 Then
Response.ClearContent()
Response.WriteFile("/401.html")
End If
End Sub