1

I have an ASP.NET web application project (using MVC) which i've installed the nuget package Elmah.MVC 2.1.2 on. I have additional class library projects of: contracts and services along with a WCF project.

I am trying to capture the exceptions within my service but I am unable to receive the details of the exception. I am presented with a message as so:

The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults...

I've searched around on incorporating Elmah with WCF but they all seem to refer to the regular Elmah nuget package, not the Elmah.MVC nuget package which is slightly different and contains different web.config settings.

I've tried putting a catch of faultexception in my service but that didn't seem to work. I am also unsure if I have to install ELMAH on my WCF application as well.

Any help would be much appreciated

Eitan K
  • 837
  • 1
  • 17
  • 39

1 Answers1

0

Including the IncludeExceptionDetailInFaults in the service behaviours config will bubble the exception up and from there the application can handle it in Elmah.

I did trial installing Elmah in WCF years and years ago and it's not a good move. Basically you have to setup the WCF service is a HTTP web application (with all the overhead from IIS) therefore ruining all speed gains, and just making it horrible in general :)

Paul Carroll
  • 1,523
  • 13
  • 15