Is it possible to have a custom loginpage when using windows authentication on your IIS site? I guess I need to mix form+windows authentication to make this happen?
It is not possible to implement a custom login for site using windows authentication. Windows auth happens before your code runs so it is either using Windows auth or use forms authentication, you can't do both, and authentication via Windows doesn't mean you are authenticated via Forms auth, and logging in with Forms auth doesn't mean you are Windows authenticated. To validate that you are logged in from forms auth, code has to run...but for the code to run you first have to be validated via Windows auth. You're basically using two different auth mechanisms thinking they are compatible or equivalent when they're not. windows authentication works on different TCP/IP layer and form authentication works on Internet layer vs Application layer and there is also different type of windows authentication are available like Kerberos version with NTLM fallback.The windows authentication form is built-in into the browser.
For workaround you could try:
• Implement a custom membership provider, where you can use, when needed, an impersonation/delegation mechanism
• Implement a single sign-on architecture, using, for example, ADFS.
Regards, Jalpa.