Fault Message Format from asmx web service
<p><strong>strong text</strong>
I have a basic web service (asmx) which throws soap exception. Below is the the         code of service.asmx and web.config. I am expecting the response from web         service in below format in IE. but i am getting the reponse with a single line         in IE as "this is exception".Can you please help me to get the format as given below. I am not able to         understand where to change?in any web.config file or asmx??</p>

<pre><code>service.aspx
============  
&lt;%@ WebService Language="C#" Class="zzz" %&gt;

using System.Web.Services;

using System.Web.Services.Protocols;

using System.Xml;

[WebServiceBinding()]

public class zzz : WebService

{

[WebMethod()]

public void abc() 

{

throw new SoapException("this is the exception", SoapException.ClientFaultCode);

}

}

expecting the response as below
===============================
  &lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
&lt;soap:Body&gt;
  &lt;soap:Fault&gt;
     &lt;faultcode&gt;soap:Client&lt;/faultcode&gt;
     &lt;faultstring&gt;Validation Exception&lt;/faultstring&gt;
     &lt;detail&gt;
        &lt;ErrorCode&gt;TESTCODE&lt;/ErrorCode&gt;
        &lt;ErrorDescription&gt;No matching emp information. Please change your request.&lt;/ErrorDescription&gt;
     &lt;/detail&gt;
  &lt;/soap:Fault&gt;
</code></pre>

<p>
</p>

<pre><code>web.xml
===============================
  &lt;?xml version="1.0"?&gt;
&lt;configuration&gt;
&lt;appSettings/&gt;
&lt;connectionStrings/&gt;
&lt;system.web&gt;
&lt;!-- 
Set compilation debug="true" to insert debugging 
symbols into the compiled page. Because this 
affects performance, set this value to true only 
during development.
--&gt;
&lt;compilation debug="true"/&gt;
&lt;!--
The &lt;authentication&gt; section enables configuration 
of the security authentication mode used by 
ASP.NET to identify an incoming user. 
--&gt;
&lt;authentication mode="Windows"/&gt;

&lt;customErrors mode="On"/&gt;

&lt;!--
The &lt;customErrors&gt; section enables configuration 
of what to do if/when an unhandled error occurs 
during the execution of a request. Specifically, 
it enables developers to configure html error pages 
to be displayed in place of a error stack trace.

&lt;customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"&gt;
&lt;error statusCode="403" redirect="NoAccess.htm" /&gt;
&lt;error statusCode="404" redirect="FileNotFound.htm" /&gt;
&lt;/customErrors&gt;
--&gt;
&lt;/system.web&gt;
&lt;/configuration&gt;
</code></pre>
