asp禁止外部服务器提交表单到服务器
禁止站外提交表单的asp代码如下:
<%
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
response.write "<br><br><center><table border=1 cellpadding=20 bordercolor=black bgcolor=#EEEEEE width=450>"
response.write "<tr><td style="font:9pt Verdana" mce_style="font:9pt Verdana">" response.write "你提交的路径有误,禁止从站点外部提交数据请不要乱改参数!"
response.write "</td></tr></table></center>"
response.end
end if
%>
使用方法:
1. 将以上代码另存为checkpath.asp
2. 在遇到表单提交的页面引用此检测代码
<!--#include file="checkpath.asp"-->
相关文档:
<%
set rs=server.CreateObject("adodb.recordset")
ids=""
call lids(keys)
ids=keys&ids
sql="select id,title,pic_xiao,content from "&tables&" where lid in("&ids&") "
......
原版
upload_5xsoft.inc 文件内容
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
dim Data_5xsoft
Class upload_5xsoft
dim objForm,objFile,Version
Public function Form(strForm)
strForm=lcase(strForm)
if not ......
<% '---调用WebService 获取Exchange2007已知用户的邮件未读数
'---参数说明----
'url:webservice 的路径
'params:方法参数
'method:方法名称
'dataType:返回的数据类型
function webServices(url,params,method,dataType)
set objXML=Server.CreateObject("MSXML2.XMLHTTP")
objXML.open "post& ......
ASP.NET中的身份验证(authentication)有哪些
=========================================
Forms身份验证:
通过其可将没有通过身份验证的请求重定向到使用 HTTP 客户端重定向的 HTML 窗体的系统。用户提供凭
据并提交该窗体。如果应用程序验证该请求,系统就会发出包含凭据或密钥的 Cookie 以重新获取该标识
。后续的 ......