防止站外提交
string servername = Request.ServerVariables["SERVER_NAME"];
string referer = Request.ServerVariables["HTTP_REFERER"];
Uri uri = new Uri(referer);
if (servername != uri.Host)
{
throw new WarnException("您提交的路径有误,禁止从站点外部提交数据!");
}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。