質問

SharePoint用CKS Toolkitを使用して作成したカスタムWCFサービスを持っています。

これらのサービスでincludeExceptionDetailInFaultsを有効にする方法は?

BasicHttpBindingServiceMetadataExchangeEndpoint SharePointを使用すると、エンドポイントが動的に作成されますか?

だから私は例外を有効にしますか?

thx

更新

私は[ServiceBehavior(IncludeExceptionDetailInFaults = true)]を使用してサービス実装を飾ることができますが、これをconfig ?? にすることが望ましいです。

役に立ちましたか?

解決

<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>
.
ライセンス: CC-BY-SA帰属
所属していません sharepoint.stackexchange
scroll top