Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

customErrors

  Asked By: Hondo    Date: May 02    Category: Asp.net    Views: 571
  

I'm having problems with displaying custom errors in my ASP.NET application.

My web.config looks like this:
<customErrors mode="On" defaultRedirect="errorPage.aspx" />

doesn't work. I compiled in Release mode. Still doesn't work. set the debug in web.config file to false... Inserted error element with statusCode inside customErrors for each error. Still doesn't work.

Any suggestions?

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Dannon Jones     Answered On: May 02

try removing the pages tag in the web.config, that might work.

 
Answer #2    Answered By: Walborgd Fischer     Answered On: May 02

I don't have any pages tags in web.config..............

 
Answer #3    Answered By: Bradley Evans     Answered On: May 02

This has come from something ages ago and I can vaguely remember having the same problem myslef - but this is what was in my webconfig for that project.

Can't remember if works or not.


<!--  custom  ERROR MESSAGES
Set mode="on" or "remoteonly" to enable custom error  messages, "off" to disable. Add
<error> tags for each of the errors  you want to handle. -->
<customErrors defaultRedirect="genericerror.htm" mode="RemoteOnly">
<!-- using mode="RemoteOnly" dishes out its own stuff -->
<error statusCode="404"
redirect="PageNotFound.htm"/>
<error statusCode="500"
redirect="InternalError.htm"/>
</customErrors>

 
Answer #4    Answered By: Barak Levi     Answered On: May 02

CustomError tag is working. The problem was with my errorPage.aspx page, which had a runtime error. Stupid me.

Obviously if the error  page has an error, then the default error message displays... Maybe this info will be usefull to someone else too.

 
Didn't find what you were looking for? Find more on customErrors Or get search suggestion and latest updates.

Related Topics:



Tagged:  

 

Related Post