이 문서에서 언급 한 단계 http://dotnetslackers.com/articles/aspnet/Getting-ELMAH-to-work-with-WCF-services.aspx을 따라 ELMAH에서 오류 로깅을 설정하도록 WCF 서비스를 구성했습니다. 그것은 Visual Studio 웹 서버와 wsHttpBinding 함께 작동하지만 IIS (5/6)에서 호스팅하고 basicHttpBinding 바인딩을 변경하면 오류를 기록하지 않습니다. 나는 "Elmah.ErrorLog.GetDefault(null).Log(new Error(ex));
"이라는 오류 신호 코드를이 링크 ELMAH - Exception Logging without having HttpContext에서 언급했듯이 변경하려고했지만 그 역시 도움이되지 못했습니다. 내가 뭘해야하는지 잘 모르겠다. 도와주세요. 여기에 WCF 서비스에 대한 구성이 있습니다 (주석을 달고 aspnetcompatibility도 주석 처리했지만 작동하지 않았습니다). basicHttpBinding이있는 작동하는 샘플이 있으면 매우 유용 할 것입니다. 미리 감사드립니다.basicHttpBinding을 사용하여 IIS에서 호스팅되는 WCF 서비스에서 ELMAH가 작동하지 않음으로 인한 오류 로깅
<system.serviceModel>
<!--<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />-->
<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">
<!--To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment-->
<serviceMetadata httpGetEnabled="true"/>
<!--To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information-->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>