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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:55:59+00:00 2026-05-25T06:55:59+00:00

Ive been reading about trapping .Net errors at page and application level and cant

  • 0

Ive been reading about trapping .Net errors at page and application level and cant decide what best suites what I want to do.
All I want is a basic redirect to a page telling the users an error has occured, no matter what the error or what page its happened on (there will be some logging going on as well).
Should this be application level?

thanks

  • 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-25T06:56:00+00:00Added an answer on May 25, 2026 at 6:56 am

    You can add the customErrors attribute to the web.config. It will redirect to specified pages on error:

    <system.web>
        <customErrors defaultRedirect="~/ErrorGeneric.html" mode="RemoteOnly">
            <error statusCode="500" redirect="~/Error500.html"/>
            <error statusCode="404" redirect="~/Error404.html"/>
        </customErrors>
    <system.web>
    

    Further more, configure a logging framework that can help you storing error information for later analysis. Here are a few frameworks: ELMAH, log4net, CuttingEdge.Logging. I would advice you to use one of these frameworks instead of fiddling around in the Application_Error event and writing log functionality yourself.

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

Sidebar

Related Questions

i want to learn Expression blend.. ive been reading some blogs.. about it.. but
Ive been reading about mysqli multi_query and couldnt find a way to do this
I've been reading about TransactionScope and had a question about its interoperability with ADO.Net
I've been reading about singletons in ASP.Net and I've seen various implementations and suggestions.
I've been reading about access modifiers in VB.Net lately, and there is something that
I've been reading about XML, XSL, XPath, etc. I want to start this small
I've been reading about the new developer-only RC0 for Silverlight, and the fact that
I've been reading about UpdateFrom, used to update a business object from the request.
I've been reading about thread-safe singleton patterns here: http://en.wikipedia.org/wiki/Singleton_pattern#C.2B.2B_.28using_pthreads.29 And it says at the
I've been reading about web services here on SO, on Wikipedia, Google, etc., and

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.