Solved

ASP.NET 403 redirect not captured?

Posted on 2010-11-23
6
833 Views
Last Modified: 2012-05-10
My ASP.NET 4.0 application seems to ignore my custom 403 redirect.  I have prevented reading of a log folder on the site.  If a user navigates to it on a browser they recieve a 403.14 'read not permitted' error.  All my error conditions default to the 404 page, why?  

Here's my web.config custom error markup:

<customErrors mode="On" defaultRedirect="OopsAnError.aspx"  >      
     <error statusCode="403" redirect="Restricted.aspx" />
     <error statusCode="404" redirect="PageNotFound.aspx" />
</customErrors>
0
Comment
Question by:Phil5780
6 Comments
 
LVL 21

Expert Comment

by:Alfred1
Comment Utility
Check the second-to-the-last comment in this link:

http://forums.asp.net/t/1462153.aspx

You can also set the error page on each web page if you want.  Check this out:

http://www.beansoftware.com/ASP.NET-Tutorials/Custom-Error-Pages.aspx

I hope this helps.
0
 
LVL 29

Expert Comment

by:Kumaraswamy R
Comment Utility
0
 
LVL 10

Expert Comment

by:thefritterfatboy
Comment Utility
May be a very simplistic question but do the files; OopsAnError.aspx and Restricted.aspx both exist?
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 21

Accepted Solution

by:
Alpesh Patel earned 500 total points
Comment Utility
It is only available with Membership provider. With custom authentication you cannot do this.
0
 

Author Comment

by:Phil5780
Comment Utility
Can membership provider be used with requiring a user to login?
0
 

Author Closing Comment

by:Phil5780
Comment Utility
Thanks
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now