using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.Services.Protocols; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml; // Avoid exposing implementation details in Release mode public class DiscreteSoapException : SoapException { public DiscreteSoapException(string fault) : this(fault, "Server", "http://schemas.xmlsoap.org/soap/envelope/") { } public DiscreteSoapException(string fault, string faultCode) : this(fault, faultCode, "http://schemas.xmlsoap.org/soap/envelope/") { } public DiscreteSoapException(string fault, string faultCode, string faultNamespace) : base(fault, new XmlQualifiedName(faultCode, faultNamespace)) { } // Turn off the munging that SoapExpection does to expose implementation details // in the SOAP faultstring. That's great when we're in debug mode, but in release // mode, we shouldn't expose such details. // NOTE: We could also turn SoapExceptions faultstring munging off by turning // custom errors on in the web.config file: // public override string ToString() { #if DEBUG return base.ToString(); #else return Message; #endif } }