Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ApplicationException

Status
Not open for further replies.

thysonj

Programmer
Jul 6, 2001
240
US
When I throw an ApplicationException and then handle it client side it works perfect locally. If I publish the website to the production server I never get the ApplicationException I just get a generic exception with a statrus code of 500. Anyone have any idea why this is happening?
 
I am using a web service to perform an update. As I stated when I simply throw a basic ApplicationException (or in any type of exception for that matter) all I get back on my web service call is a generic exception with no type and a status code of 500.
 
Figured it out. It has to do with the debugging and customErrors setting in the web.config. Set them both to off on the production server and it worked.
 
this is considered bad practice. you shouldn't provide the end user with exception details. instead log the details (using a logging library like log4net, nlog, ent.lib. logger) and display a generic error message to the end user(which is the default behavior).

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top