Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIS 5.0 custom errors

Status
Not open for further replies.

kmcculler

Programmer
Jul 5, 2000
81
0
0
US
Hello all, I've been wrestling with an issue around redirecting errors to a custom page via IIS 5.0 that I was hoping someone here could help me with.

I'm trying to setup a page that uses asp to do windows authentication. If the authentication fails, I'd like to redirect the page to a custom error rather than the generic asp page.

I've gone to the IIS settings - site root directory - properites and set the custom error message for errors 401.1 through 401.5 to a html file that I authored. When I go to the page in my browser and I'm not authorized I click cancel on the login popup I still get the generic asp error 401.2

The redirect works in all other cases that I can see
. I will be redirected if I enter my username/pwd 3 times OR enter my name at least once then cancel.

Is there any workaround so that I can get the redirect to behave correctly if the user just presses cancel after receiving the popup?

I've already tried setting an custom error in the web.config file but that gave me the same results as above. Thanks for your help

Kris McCuller
 
Do you have a different page for each of your custom error messages? 401.1-401.5?

If so, I ran into a strange problem with IIS 5.0 custom error pages. For some reason, the error page I created had to be at least a certain size file, otherwise it kept defaulting to the generic message.

I added a bunch of garbage text in my custom error page, the WOW, it worked.



[monkey][snake] <.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top