401 error handling

canasdaq

New member
Joined
May 4, 2006
Messages
3
Programming Experience
Beginner
I'm not sure if my message falls under this post. Can anyone please help me. I am trying to trap 401 or unauthorized errors in vb.net. I tried <customerros> in web.config file. But it never seem to work. 404 errors seem to work this way. Here is the code that i used.
<customErrors mode="On" defaultRedirect="errors.aspx" >
<error statusCode="401" redirect="Custom401.aspx" />
<error statusCode="401.1" redirect="Custom401.aspx" />
<error statusCode="401.2" redirect="Custom401.aspx" />
<error statusCode="401.3" redirect="Custom401.aspx" />
<error statusCode="401.4" redirect="Custom401.aspx" />
<error statusCode="401.5" redirect="Custom401.aspx" />
<error statusCode="401.7" redirect="Custom401.aspx" />
<error statusCode="404" redirect="Custom401.aspx" />
</customErrors>

I thought if not just 401, then it might be looking for 401.1....but no. Please help me i have been working on this for 4 days now and i am in big trouble now. I need to finish this immediately. Any help would be greatly appreciated.
 
Back
Top