Solved

ASP.NET 403 redirect not captured?

Posted on 2010-11-23
6
836 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:Alfred1
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 29

Expert Comment

by:Kumaraswamy R
ID: 34203421
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 500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
insert value of checklistbox checked 4 39
Why use this lambda? 12 62
Json and ajax 1 20
Blending HTML output from R Studio into a ASP.Net/C# project 4 19
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 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