The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 18, 2019, 06:57:23 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: CustomError in web.config not working properly  (Read 3741 times)
IrfanRaza
n00b
*
Offline Offline

Posts: 1


View Profile
« on: April 21, 2010, 08:26:06 AM »

Hello friends,

I am using following setting for customError.

<customErrors mode="On" defaultRedirect="GenericErrorPage.aspx">
<error statusCode="403" redirect="NoAccess.aspx" />
<error statusCode="404" redirect="FileNotFound.aspx" />
</customErrors>

I have a folder "Admin" having access to administrators role. When someone other than administrators tries to access the pages inside admin folder, it is redirected to login page. My expectation is to display "NoAccess.aspx".

Whats wrong with this code? Or is there other meaning to statusCode=403.

Could someone provide help on this.

Thanks for sharing your valuable time.
Logged

No links in signatures please
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #1 on: April 21, 2010, 01:15:01 PM »

Greetings Irfan, welcome to the cache.

I am on a client site ATM and cannot give this the attention it needs, Ill try to look at this later ts evening.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #2 on: April 22, 2010, 03:32:01 PM »

Oh wait ... sorry mate, I'm an Apache guy, didn't realize this is ASP and .Net.

Sounds like the wind is blowing through this thread... I don't know how many folks here are still .ASP or IIS (I assume) guys.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
DangerMouse
Expert
****
Offline Offline

Posts: 244



View Profile
« Reply #3 on: April 23, 2010, 02:04:27 PM »

I've got the dubious pleasure of working with IIS - I'm afraid I don't know the answer directly based on experience, but I'd suggest trying out the 401 error code handler?

DM
Logged
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!