Click here to Skip to main content
15,921,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have this situation where a customer is viewing their shopping cart, and then they want to go to checkout. So they click checkout, and get booted back to the home page (this is by design when there's an error).

I then receive an email (again, by design) with the following error message:


Offending URL: http://www.***.co.uk/checkout.aspx

Source: System.Web

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

User: *****

Referrer URL: http://www.***.co.uk/ShoppingCart.aspx

Stack trace: 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.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.checkout_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Now, this has only happened a few times, but it does happen. The thing is, it has never happened to me, and I cannot seem to replicate the problem even when I log in as the user and try to carry out the same transaction.

Whilst I have written the site, my levels of knowledge and handling errors at this level are non-existent. I don't really understand the error message, however, I don't think it really tells me what the problem is.... does it?

Anyway, my questions are as follows:
Can anybody shed any light on the error message above please?
Is there a way of giving myself more info in the email when an error occurs on the site?
Where can I start to learn about reading and understanding these error messages?

Any help in the right direction would be greatly appreciated.
Posted

1 solution

Your error handling code needs to show you the inner exception, in order to see what the real error is, I suspect. To get more info, check the exception recursively on it's InnerException property, until that is null. The innermost exception is what's really gone wrong. The checkout.aspx page is where the error occured, in the ProcessRequest method. You could also add some sort of logging inside that method to help you work out where it's blowing up, or if that method is long, break it in to functions so the error message will tell you what part blew up.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900