Servicio WCF personalizado: includeExceptionDetailInFaults
-
09-12-2019 - |
Pregunta
Tengo un servicio WCF personalizado que creé usando el kit de herramientas CKS para SharePoint.
¿Cómo habilito? includeExceptionDetailInFaults
en estos servicios?
Según tengo entendido, al usar BasicHttpBindingServiceMetadataExchangeEndpoint
¿SharePoint crea los puntos finales dinámicamente?
Entonces, ¿dónde habilito las excepciones?
Gracias
ACTUALIZAR
Puedo decorar la implementación del servicio con [ServiceBehavior(IncludeExceptionDetailInFaults = true)]
¿Qué funciona, pero es preferible tener esto en la configuración?
Solución
<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>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a sharepoint.stackexchange