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 905347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:12:10+00:00 2026-05-15T16:12:10+00:00

I have an ASP.NET Web Application project that used to target ASP.NET 2.0. I

  • 0

I have an ASP.NET Web Application project that used to target ASP.NET 2.0. I installed ASP.NET 4.0 on the web server hosting the web application and changed the web application project to target .NET 4.0. Everything works ok with on exception: Custom Error Handling

Before migrating to .NET 4.0, custom errors used to work. In my application I have a Global.asax page with a global application error handler which works fine on my development environment (and worked just fine with .NET 2.0 on the server as well) which doesn’t work with the new IIS 7 with .NET 4.0 setup. I also have a customErrors section in the web.config file which is supposed redirect the browser to a custom error page in case the error was such that even the global application handler would fail. That also works fine on my machine, but fails to do anything on the server. And I did try all three different settings for the mode attribute.

If anyone has any idea why this might be happening I’d appreciate any feedback!

  • 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-15T16:12:11+00:00Added an answer on May 15, 2026 at 4:12 pm

    This one is still a bit mysterious but here’s what I found. My error handlers were all firing, and the redirects were happening just as before but when the request was finally transferred to the error handler .aspx page (via a Server.Transfer) it was dying. The reason for that was that on the ErrorHandler.aspx page, I was setting the HTTP response code to 200, trying not to send back an actual HTTP error code, and instead to simply display a friendly message. Once I commented out the code that was setting the HTTP Status code to 200, all started working fine and almost like before the move to .NET 4.0.

    I’m still not sure why attempting to set the HTTP Status code to 200 was causing the strange behavior, but I’m glad I found it, corrected the problem and could get on with my life..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a really simple ASP.NET web application and a web setup project that
I have a Crystal Report used in an ASP.NET web application that I've just
Suppose you have two seperate ASP.NET Web Application projects that both need to use
I have an ASP.NET web application project which references another project called ModusCore (or
We have a pretty big ASP.NET WebForm (web application) project with a lot of
I have an ASP.NET application with a <codeSubDirectories> section in web.config. My main project
I have an asp.net web application written in C# using a SQL Server 2008
I have a pretty big web application that I created last year using ASP.NET
I have a web application that I'm working on (ASP.NET 2.0 with C#, using
I have the following project solution: There is a ASP.NET MVC Web Application where

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.