📄 discretesoapexception.cs
字号:
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:
// <system.web><customErrors mode="On" /></system.web>
public override string ToString() {
#if DEBUG
return base.ToString();
#else
return Message;
#endif
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -