Exemple #1
0
        private void WriteFault(HttpContext context, XmlRpcFaultException exception)
        {
            context.Response.Clear();
            context.Response.Write(string.Format(@"<?xml version='1.0'?>
<methodResponse>
   <fault>
      <value>
         <struct>
            <member>
               <name>faultCode</name>
               <value><int>{0}</int></value>
               </member>
            <member>
               <name>faultString</name>
               <value><string>{1}</string></value>
               </member>
            </struct>
         </value>
      </fault>
   </methodResponse>", exception.FaultCode, HttpContext.Current.Server.HtmlEncode(exception.FaultMessage)));
        }
 private void WriteFault(HttpContext context, XmlRpcFaultException exception)
 {
     context.Response.Clear();
     context.Response.Write(string.Format(@"<?xml version='1.0'?>
     <methodResponse>
        <fault>
       <value>
      <struct>
     <member>
        <name>faultCode</name>
        <value><int>{0}</int></value>
        </member>
     <member>
        <name>faultString</name>
        <value><string>{1}</string></value>
        </member>
     </struct>
      </value>
       </fault>
        </methodResponse>", exception.FaultCode, HttpContext.Current.Server.HtmlEncode(exception.FaultMessage)));
 }