I followed the steps mentioned in this article http://dotnetslackers.com/articles/aspnet/Getting-ELMAH-to-work-with-WCF-services.aspx to configure the WCF service to configure error logging using ELMAH. it works with wsHttpBinding with a Visual studio web server, but when I host it in IIS (5/6) and change the binding to basicHttpBinding, it does not log errors. I tried to change the error signaling code to " Elmah.ErrorLog.GetDefault(null).Log(new Error(ex)); " as indicated in this link ELMAH is an exception log without HttpContext , but that didn't help either. I donβt know what else I need to do. Please help. here is the configuration for the WCF service (I tried to comment and uncomment the aspnet compatibility but it didnβt work). if there is a working sample with basicHttpBinding, that would be very helpful. thanks in advance.
<system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpEndpointBinding"> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Windows" /> </security> </binding> </basicHttpBinding> </bindings> <services> <service behaviorConfiguration="ElmahWCF.Service1Behavior" name="ElmahWCF.Service1"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding" name="BasicHttpEndpoint" contract="ElmahWCF.IService1"> </endpoint> </service> </services> <behaviors> <serviceBehaviors> <behavior name="ElmahWCF.Service1Behavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel>
exception-handling error-handling wcf elmah
RKP Dec 17 '10 at 12:17 2010-12-17 12:17
source share