Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP.NET 403 redirect not captured?

Posted on 2010-11-23
6
Medium Priority
?
851 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 21

Expert Comment

by:Alfred A.
ID: 34203014
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 10

Expert Comment

by:thefritterfatboy
ID: 34203449
May be a very simplistic question but do the files; OopsAnError.aspx and Restricted.aspx both exist?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 21

Accepted Solution

by:
Alpesh Patel earned 2000 total points
ID: 34205090
It is only available with Membership provider. With custom authentication you cannot do this.
0
 

Author Comment

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

Author Closing Comment

by:Phil5780
ID: 34293695
Thanks
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

688 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