Transient Error Recovery - logging the exceptions

Posts   
 
    
Jamanga
User
Posts: 93
Joined: 21-Jul-2006
# Posted on: 31-Oct-2014 06:22:52   

Hi guys

I have an ASP.NET app in the DMZ and have an occassional issue where one application will drop the db connection during a request. Network team says "everything is perfect" disappointed . So I'd handle it within the Application_Error section and depending on the exception type might attempt a retry myself via Server.Transfer().

Now this has gone away thanks to your transient error strategy - which is awesome!! smile My question is how can I log these exceptions, so that I can track how often they are occurring?

Thanks, James

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 31-Oct-2014 07:04:58   

Hi James,

One possible way would be to put a trace listener to capture every activity of the transient recovery actions. The category used in such trace is "Transient Error Recovery".

Another possible way is to subclass your recoveryStrategy class (i.e. MyCustomSqlAzureRecoveryStrategy) and write your own code there. You could add an event that raises when a transient error appears, etc.

David Elizondo | LLBLGen Support Team
Jamanga
User
Posts: 93
Joined: 21-Jul-2006
# Posted on: 31-Oct-2014 21:15:48   

Hi daelmo

Thanks for the quick response, I would never have considered using a listener.

Cheers, James