Solved

How do I suppress Errors completely?

Posted on 2007-11-19
2
359 Views
Last Modified: 2013-12-17
Hi everyone,
I'm trying to suppress .net error messages from the client browser for security reasons (ie. I want as little info displayed).
I have modified the global.asax application_error method to redirect to a simple html page.  However,some errors are still showing typical .net error messages.  A cross site scripting error will show typical .net messages instead of redirecting.
The customErrors mode is set to "On" in my webconfig, but I would like it so that ALL errors get redirected to my html page.
How do I do that?
0
Comment
Question by:web_ohh
[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
2 Comments
 
LVL 4

Accepted Solution

by:
rallsaldo earned 250 total points
ID: 20315151
Hi,

Try adding a CustomErrors Section to your Web.Config. You can specify a page for all errors such as:

<customErrors defaultRedirect="MainErrorPage.aspx" mode="On"/>

or have more specific page redirects depending on error:

<customErrors defaultRedirect="MainErrorPage.aspx" mode="On">  
   <error statusCode="404" redirect="FileNotFoundError.aspx" />
    <error statusCode="403" redirect="AccessDeniedError.aspx" />
</customErrors>

Hope that helps,
R
0
 

Author Comment

by:web_ohh
ID: 20315343
Awesome.  It worked AND my custom logging is still working as well.
Thanks rallsaldo,
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Foreword (May 2015) This web page has appeared at Google.  It's definitely worth considering! https://www.google.com/about/careers/students/guide-to-technical-development.html How to Know You are Making a Difference at EE In August, 2013, one …
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

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