Customizing windows authentication

R

Ram...

Hi,

In windows authentication
1. Apart from user name and password, can we force the user to select
the domain name at the time of login through browser?.

2. In windows authentication
If user login fails, how to redirect the user to a customized error
page?
 
G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top