禁止新增web引用
阿新 • • 發佈:2018-12-31
public class AsmxHelpModule : System.Web.IHttpModule
{
private AsmxHelpModule()
{
}
private void Application_BeginRequest(object sender, System.EventArgs e)
{
string requestPath = HttpContext.Current.Request.RawUrl;
requestPath = requestPath.Trim();
requestPath = requestPath.ToLower();
if (((requestPath.IndexOf("?wsdl") > 0)
|| (requestPath.IndexOf("?disco") > 0)))
{
throw new HttpException(404, "");
}
}
public virtual void Init(HttpApplication app)
{
app.BeginRequest += new System.EventHandler(this.Application_BeginRequest);
}
public virtual void Dispose()
{
}
}
{
private AsmxHelpModule()
{
}
private void Application_BeginRequest(object sender, System.EventArgs e)
{
string requestPath = HttpContext.Current.Request.RawUrl;
requestPath = requestPath.Trim();
requestPath = requestPath.ToLower();
if (((requestPath.IndexOf("?wsdl") > 0)
|| (requestPath.IndexOf("?disco") > 0)))
{
throw new HttpException(404, "");
}
}
public virtual void Init(HttpApplication app)
{
app.BeginRequest += new System.EventHandler(this.Application_BeginRequest);
}
public virtual void Dispose()
{
}
}