Question

I've got a custom WCF service that I created using the CKS toolkit for SharePoint.

How do I enable includeExceptionDetailInFaults in these services?

The way I understand it is, when using BasicHttpBindingServiceMetadataExchangeEndpoint SharePoint creates the endpoints dynamically?

So where do i enabled exceptions?

Thx

UPDATE

I can decorate the service implementation with [ServiceBehavior(IncludeExceptionDetailInFaults = true)] which works, but it's preferable to have this in config??

Was it helpful?

Solution

<system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="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="true" />**
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top