[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How do I suppress Errors completely?

Posted on 2007-11-19
2
Medium Priority
?
368 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 1000 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

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

650 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