A non-obvious way to alter the behavior of .NET automatically populating Soap fault elements with stack trace information (specifically, in the faultString element) is to use the customErrors configuration element, which is part of the ASP.NET Settings Schema.
I state this is non-obvious because in the documentation, the following statement is made here under the Remarks section:
The <customErrors> element does not apply to errors that occur in XML Web services.
However, the use of this element’s mode attribute clearly does alter the behavior, when setting the mode attribute to “On”, in the system.web configuration section:
<configuration>
<system.web>
<customErrors mode="On" />
</system.web>
</configuration>
Note that the default setting for the customErrors element’s mode attribute is “RemoteOnly” which will add stack trace information for local requests and remove it for remote requests. This is usually desirable behavior but depending upon your own needs it is good to know the availability of the mode attribute’s “On” setting to always, universally remove the stack trace information, should you desire to do so.
a55ae211-aca9-47b7-a3db-3a34e3df688b|5|4.8