1
votes

My custom error handler returns:

Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.

Source: System.Web

Stack Track: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.inc_iframe_eventdetail_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\c30f285f\68ea8ff1\App_Web_g4uza9zi.4.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Target Site: Boolean HandleError(System.Exception)

However, the generic error handler returns:

Server Error in '/' Application. Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

Source Error:

Line 44: ChurchEventDataSource.SelectParameters.Add("ChurchEventId", Request.QueryString["EventId"]); Line 45: Line 46: EventFormView.DataBind(); Line 47: break; Line 48:

Source File: c:\Sites\Altruistic\ChurchFinder\Inc\Iframe\EventDetail.aspx.cs Line: 46

Obviously, I want the most detailed description possible.

1
Which is the code of custom error handler and generic error handler ? Global.asax Application_Error ? and your web.config about customerrors and httperrors sections ? – PreguntonCojoneroCabrón

1 Answers

0
votes

Where is your custom error handler & how are you retrieving the exception. Most probably you might be using HttpServerUtility.GetLastError method to get the exception - so in such case use InnerException property (if not null) of the actual exception object - it will have the actual exception that has occured.