Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1083671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:27:57+00:00 2026-05-16T22:27:57+00:00

I have an ASP.NET 4.0 MVC web application running on IIS 6.0 with a

  • 0

I have an ASP.NET 4.0 MVC web application running on IIS 6.0 with a webconfig custom error section of:

<customErrors mode="On" redirectMode="ResponseRewrite" defaultRedirect="/Home/Error">
  <error statusCode="403" redirect="/Home/Error"/>
  <error statusCode="404" redirect="/Home/Error"/>
</customErrors>

and an error.aspx page that looks like this:

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<System.Web.Mvc.HandleErrorInfo>" %>

<%@ Import Namespace="System.Security.Cryptography" %>
<%@ Import Namespace="System.Threading" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Error
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Error Processing your request.</h2>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Scripts" runat="server">
    <script runat="server">
       void Page_Load() {
          byte[] delay = new byte[1];
          RandomNumberGenerator prng = new RNGCryptoServiceProvider();

          prng.GetBytes(delay);
          Thread.Sleep((int)delay[0]);

          IDisposable disposable = prng as IDisposable;
          if (disposable != null) { disposable.Dispose(); }
        }
    </script>
</asp:Content>

Whenever i include the above “redirectMode=”ResponseRewrite”” in the webconfig custom errors section the redirect to my custom errors page no longer works and i get the page error of “Server error in “/” application – resource cannot be found”. In fact the controller action is ignored as well. When i take that setting our everything works as it should. I am trying to incorporate Scott Gu’s workaround for the Asp.net securtiy vulnerability listed here: http://weblogs.asp.net/scottgu/archive/2010/09/18/important-asp-net-security-vulnerability.aspx

Any help would be greatly appreciated.
Thanks,
Billy

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:27:57+00:00Added an answer on May 16, 2026 at 10:27 pm

    Unfortunately, you cannot have any <error> tags within the <customErrors> block according to Scott Guthrie. They are definitely working on a patch, but in the mean time, you have to use a very simple <customErrors> section like the following:

    <customErrors mode="On" redirectMode="ResponseRewrite" defaultRedirect="~/error.aspx" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET MVC web application running in IIS as a subweb; let's
I have an ASP.NET MVC 3 Beta application running on IIS. In my web.config
I have asp.net mvc 4 web application project on my server in IIS Directory.
I have an Asp.Net MVC 2 web application deployed on IIS 7.5 on .Net
I have an ASP.NET MVC web application running from http://localhost/myappname . From jQuery, I
I have a Asp.net MVC web application, containing mostly text. I want to put
Here's what I'm trying to do. I have an ASP.NET MVC web application, where
I have developed a MVC web application with ASP.NET MVC and im just wondering
I have created blank Asp.Net-MVC 3 web application and want to write my own
I have one question; In my ASP.NET MVC web application have to do certain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.