Salut à tous,
Est il possible de modifier le message d'erreur par défaut d'un WCF ?
Voici le problème :
Si j'envoie une SOAP Request sur mon WCF (Hébergé en service Windows) qui n'est pas valide, (un noeud XML obligatoire manquant etc.), j'obtiens ce message d'erreur :
Est il possible de le changer ? C'est à dire de changer le message d'erreur par défaut de WCF (pour toutes les erreurs non catchées/handled) ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <s:Fault> <faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</faultcode> <faultstring xml:lang="en-US">The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.</faultstring> </s:Fault> </s:Body> </s:Envelope>
merci d'avance !
Partager