Setting includeExceptionDetailInFaults to true allows the service to return any exception that is thrown by the application code even if the exception is not declared using the FaultContractAttribute. This setting is useful when debugging cases where the server is throwing an unexpected exception. By using this attribute, a serialized form of the unknown exception is returned and you can examine more details of the exception.
Caution: |
|---|
|
Returning managed exception information to clients can be a security risk because exception details expose information about the internal service implementation that could be used by unauthorized clients. Because of the security issues involved, it is strongly recommended that you only do so in controlled debugging scenarios. You should set includeExceptionDetailInFaults to false when deploying your application. |
For details about the security issues related to managed exception, see Specifying and Handling Faults in Contracts and Services. For a code sample, see Service Debug Behavior.
You can also set httpsHelpPageEnabled and httpsHelpPageUrl to enable or disable the help page. Each service can optionally expose a help page that contains information about the service including the endpoint to get WSDL for the service. This can be enabled by setting httpHelpPageEnabled to true. This enables the help page to be returned to a GET request to the base address of the service. You can change this address by setting the httpHelpPageUrl attribute. In addition, you can make this secure by using HTTPS instead of HTTP.
The optional httpHelpPageBinding and httpHelpPageBinding attributes allow you to configure the bindings used to access the service web page. If they are not specified, the default bindings (HttpTransportBindingElement, in the case of HTTP and HttpsTransportBindingElement, in the case of HTTPS) are used for service help page access as appropriate. Notice that you cannot use these attributes with the built-in WCF bindings. Only bindings with inner binding elements that support System.ServiceModel.Channels.IReplyChannel will be supported. Additionally, the System.ServiceModel.Channels.MessageVersion property of the binding must be System.ServiceModel.Channels.MessageVersion.None.