CustomErrors is a mechanism used to provide custom error pages in ASP.NET based web applications.
Questions tagged [custom-errors]
323 questions
82
votes
7 answers
ASP.NET Custom 404 Returning 200 OK Instead of 404 Not Found
After trying to setup my site for Google Webmaster Tools I found that my Custom ASP.NET 404 page was not returning the 404 status code. It displayed the correct custom page and told the browser that everything is OK. This is consider a soft 404 or…

Bobby Cannon
- 6,665
- 8
- 33
- 46
77
votes
10 answers
CustomErrors does not work when setting redirectMode="ResponseRewrite"
In a old site, I was changing the way that CustomErrors works by adding redirectMode="ResponseRewrite" (new in 3.5 SP1):

Eduardo Molteni
- 38,786
- 23
- 141
- 206
71
votes
4 answers
How do I get the member to which my custom attribute was applied?
I'm creating a custom attribute in C# and I want to do different things based on whether the attribute is applied to a method versus a property. At first I was going to do new StackTrace().GetFrame(1).GetMethod() in my custom attribute constructor…

Sarah Vessels
- 30,930
- 33
- 155
- 222
70
votes
7 answers
jQuery override default validation error message display (Css) Popup/Tooltip like
I'm trying to over ride the default error message label with a div instead of a label. I have looked at this post as well and get how to do it but my limitations with CSS are haunting me. How can I display this like some of these examples:
Example…

Phill Pafford
- 83,471
- 91
- 263
- 383
68
votes
4 answers
Integrate type name in static_assert output?
I like to give helpful errors / messages, and I also want to do so for my static_asserts. The problem is, that they depend on template parameters. Normally, those parameters will get displayed on way or an other due to the error raised, but they are…

Xeo
- 129,499
- 52
- 291
- 397
46
votes
3 answers
Where and how to define for my asp.net MVC 3 web application
I want to set the custome error to be true to prevent users from viewing detailed info about my application. But I cannot find where I should write this ; should it be in the web.config or in the web, debug.config or else…

John John
- 1
- 72
- 238
- 501
36
votes
3 answers
Tools to generate higher-quality error messages for template-based code?
Concepts, that would render these tools unnecessary, are not part of C++11.
STLFilt would have been one option but it is no longer maintained.
Clang claims to give expressive diagnostics although important C++11 features are not available…

Ali
- 56,466
- 29
- 168
- 265
35
votes
5 answers
How can I raise an error in if-else function in java
All the googling I've done seems focused on "catching" errors. I want to be able to raise my own if certain conditions are met. I tried using the Error() class and its subclasses but Eclipse doesn't recognize them.
This is what I want to…

Eli Dinkelspiel
- 769
- 1
- 6
- 15
34
votes
6 answers
ASP.NET MVC 5 Custom Error Page
I am using a custom authorize attribute in a ASP.NET MVC 5 application like following:
public class CustomAuthorizeAttribute : AuthorizeAttribute
{
protected override void HandleUnauthorizedRequest(AuthorizationContext context)
{
if…

Haider
- 1,488
- 2
- 15
- 29
32
votes
3 answers
C# Remoting - How to turn off CustomErrors
I getting the following error when I try to connect to my server app using remoting:
A problem seems to have occured whilst connecting to the remote server:
Server encountered an internal error. For more information, turn off customErrors in the…

HAdes
- 16,713
- 22
- 58
- 74
29
votes
5 answers
Implementing a Custom Error page on an ASP.Net website
I have an ASP.Net website and I want to use a custom error page. I put the following code in my web.config
The problem is…

Yeodave
- 978
- 1
- 8
- 15
27
votes
4 answers
Asp.net - error when trying to access working webpage
I have created an asp.net webpage and have uploaded it onto a webserver. However when I try to view the page remotely, I get errors about the customerror tag in the web.config file. The page works locally with no errors or warnings. Also if I upload…

bobby123
- 1,006
- 4
- 14
- 24
22
votes
8 answers
Is it "right" to translate error messages?
This is somehow subjective depending on the target translation language, but bear with me for a sec.
I have recently been involved in a translation project. The goal was to translate the strings of an MVC framework to the Greek language.
70% of the…

Iraklis
- 2,762
- 1
- 24
- 31
21
votes
2 answers
How do I create a custom validator with a custom error message in Grails?
How do I create a custom validator in grails and make it pass a custom string back to the view and an error message?
I saw so many people getting stuck in the same please, I decided to create a question and an answer to deal with it.

sparkyspider
- 13,195
- 10
- 89
- 133
17
votes
2 answers
How do I get a correct backtrace for a custom error class in NodeJS?
My understanding for the "right" way to make a custom Error class in JavaScript is something like this:
function MyError(message) {
this.name = "MyError";
this.message = message || "Default Message";
}
MyError.prototype = new…

Evan P.
- 979
- 1
- 10
- 17