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

  • Home
  • SEARCH
  • 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 931415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:29:49+00:00 2026-05-15T20:29:49+00:00

I have custom errors set in the web config file as follows: <customErrors mode=RemoteOnly

  • 0

I have custom errors set in the web config file as follows:

<customErrors mode="RemoteOnly" defaultRedirect="GenericError.aspx" />

Fine and dandy… I like that mode=”RemoteOnly” facilitates development…

For unhandled exceptions, I have in global.asax:

Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
    Response.Redirect("GenericError.aspx")
End Sub

However, unhandled exceptions are going to the generic error page instead of the informative yellow screen of death preferred by developers. I can comment out the redirect in global.asax, but then I need to remember to change it for the production environment. Is there a way I can check in Application_Error whether I am remote or not to determine whether to redirect?

  • 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-15T20:29:50+00:00Added an answer on May 15, 2026 at 8:29 pm

    You do not need the Response.Redirect in the Global.asax. It duplicates the behaviour of the <customErrors> tag. RemoteOnly will give end users the custom error message and local usrs the standard asp.net error page. If your developers use a local web server for development you have both in one.

    Another approach is to set the <customErrors> to Off on development servers and set it to On in the production environment. There are usually many items in the web.config that need changing so it is no more of a hardship.

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

Sidebar

Related Questions

I have custom errors enabled in my web.config file: <customErrors mode=On defaultRedirect=~/ErrorPage.aspx /> When
i have the following piece of code my my web.config: <customErrors mode=On defaultRedirect=~/Exception.aspx enableVersionHeader=false>
I have the following setup: Web.config has customErrors mode=Off Global.Application_Error() event calls a custom
Here's the situation: - I have <customErrors mode=On defaultRedirect=error.html /> in my web.config. I
Here is my Web.config file: <?xml version=1.0?> <configuration> <system.web> <customErrors mode=Off /> <compilation debug=true
We have a web application that has custom errors turned on so that users
I've create a custom configuration section in my web.config file for my 3.5 web
I have the following in my web.config <httpErrors errorMode="Custom"> <remove statusCode="500" subStatusCode="-1" /> <error
I have developed REST WCF and set binding following way in web.config <bindings> <webHttpBinding>
So i have just set new Error Handlers in httpd.conf for custom error pages:

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.