カスタムWCFサービス - IncludeExceptionDetailInfaults
-
09-12-2019 - |
質問
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>
. 所属していません sharepoint.stackexchange