62,041
社区成员
发帖
与我相关
我的任务
分享
protected void Application_BeginRequest(object sender, EventArgs e)
{
string IP = HttpContext.Current.Request.UserHostAddress ;//取得请求者的IP
//这里是在数据库中的黑名单 比较代码。
if(XXX )
{
HttpContext.Current.Response.Write("你的请求已屏蔽!");
HttpContext.Current.Response.End();//到此为至
}
}