Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've got a WSS3 sharepoint site that requires windows authentication both in IIS and via the Sharepoint site. What I would like to do is in the case that a user does not provide valid AD credentials they are redirected to a custom error page.

This isn't forms-based authentication. They are challenged. In IE if I cancel I see a generic "401 UNAUTHORIZED" plain text response. If I attempt a log in then cancel I see a blank page.

I have looked into several options such as customErrors, httpModule interception (only saw examples for this after the user is authenticated or when anonymous access is allowed via IIS), IIS Url rewrites (didn't see how this could help).

[UPDATE] This article fixes the arrive then immediately cancelled when using the "Log on as a different user" option from within Sharepoint, but not when credentials are provided that are invalid, then cancelled or when hitting Sharepoint freshly and providing credentials:

Redirecting to custom 401 page when "Access denied" occures within an ASP.NET application with Windows authentication

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.