Solved

How do I suppress Errors completely?

Posted on 2007-11-19
2
353 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
2 Comments
 
LVL 4

Accepted Solution

by:
rallsaldo earned 250 total points
Comment Utility
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
Comment Utility
Awesome.  It worked AND my custom logging is still working as well.
Thanks rallsaldo,
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SQl help with selection 14 43
.net Multiple Row Form Fields Data Entry 4 15
Form design in vb.net 7 17
String manipulation 15 48
Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
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…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now