我有一个经典的asp页面。此页面使用通过 post 方法重定向另一个 asp 页面。
但是重定向的页面偶尔会从 Request.Form 集合中获取任何价值。
我们在表中记录 HTTP 错误。当我检查日志时,我发现了一个共同点。浏览器主要是Mozilla。
下面是一些类似的浏览器详细信息;
Mozilla/3.0 (compatible; Indy Library)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET4.0C; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0E)
Mozilla/4.05 [en] (WinXP; I)
Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; tr) AppleWebKit/534.8+ (KHTML, like Gecko) Version/6.0.0.546 Mobile Safari/534.8+
Mozilla/5.0 (compatible; AhrefsBot/3.0; +http://ahrefs.com/robot/)
Mozilla/5.0 (compatible; AhrefsBot/3.1; +http://ahrefs.com/robot/)
Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)
Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)
Mozilla/5.0 (compatible; Ezooms/1.0; ezooms.bot@gmail.com)
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Mozilla/5.0 (compatible; MJ12bot/v1.4.3; http://www.majestic12.co.uk/bot.php?+)
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0)
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; BOIE9;TRTR)
Mozilla/5.0 (iPad; CPU OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3
Mozilla/5.0 (iPad; CPU OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3
Mozilla/5.0 (iPad; U; CPU OS 4_3_5 like Mac OS X; tr-tr) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5
Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A406 Safari/7534.48.3
Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3
Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A403 Safari/8536.25
Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25
Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; tr-tr) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5
Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_5 like Mac OS X; tr-tr) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5
Mozilla/5.0 (Linux; U; Android 2.2.1; tr-tr; HTC_Wildfire_A3333 Build/FRG83D) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.57.5 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.4
Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11
Opera/9.80 (Series 60; Opera Mini/6.5.29700/28.1857; U; tr) Presto/2.8.119 Version/11.10
Opera/9.80 (Windows NT 5.1; U; tr) Presto/2.8.131 Version/11.11
Opera/9.80 (Windows NT 6.1; U; tr) Presto/2.10.289 Version/12.00
TurnitinBot/2.1 (http://www.turnitin.com/robot/crawlerinfo.html)
Windows-Live-Social-Object-Extractor-Engine/1.0
我在不同的浏览器和操作系统中尝试过很多次。但我只是一次代表同样的情况,但我什么也抓不住。再来一张登录表。
我该怎么做?
我以前没有使用经典的asp。尝试调试问题也是对我的另一个挑战。
提前致谢
发布的表格如下
<form name="form1" method="post" action="redirect.asp">
<table width="511" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" align="left" valign="middle" class="icerik_txt_11"><strong>Aracın Markası</strong></td>
<td align="left" valign="middle" class="icerik_txt_11"><strong>:</strong></td>
<td height="30" align="left" valign="middle"><select name="markaoto" class="list1">
<%
set markalar=conn.execute("select * from dbtable ORDER BY field")
do while not markalar.eof
%>
<option value="<%=markalar("idfield")%>"><%=markalar("field")%></option>
<%
markalar.movenext
loop
%>
</select></td>
</tr>
<tr>
<td height="30" align="left" valign="middle" class="icerik_txt_11"><strong>Kullanım Tipi</strong></td>
<td align="left" valign="middle" class="icerik_txt_11"><strong>:</strong></td>
<td height="30" align="left" valign="middle"><select name="tarz" class="list1">
<option value="0" selecteud="selected">Tümü</option>
<option value="1" >Hususi</option>
<option value="2" >Hafif Ticari</option>
<option value="3" >Ağır Ticari</option>
</select></td>
</tr>
<tr>
<td height="30" align="left" valign="middle" class="icerik_txt_11"><strong>Şehir</strong></td>
<td align="left" valign="middle" class="icerik_txt_11"><strong>:</strong></td>
<td height="30" align="left" valign="middle"><select name="iloto" class="list1">
<%
set iller=conn.execute("SELECT * FROM TBL_ILLER ORDER BY IL")
do while not iller.eof
if iller("ILKOD")=34 then
%>
<option selected="selected" value="<%=iller("ILKOD")%>"><%=iller("IL")%></option>
<% else %>
<option value="<%=iller("ILKOD")%>"><%=iller("IL")%></option>
<%
end if
iller.movenext
loop
%>
</select>
</td>
</tr>
<tr>
<td width="103" height="30" align="left" valign="middle" class="icerik_txt_11"> </td>
<td width="19" align="left" valign="middle" class="icerik_txt_11"> </td>
<td width="389" height="30" align="left" valign="middle"><a href="#" onclick="anlasmalioto();" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','images/index/ara_hl.gif',1)"><br />
<img src="images/index/ara.gif" name="Image5" width="85" height="23" border="0" id="Image5" /></a>
<div id="Waiting" style="visibility:hidden">Lütfen Bekleyiniz</div>
</td>
</tr>
</table>
</form>
获取发布表单值的重定向页面服务器端代码如下;
<%
Dim regEx
Set regEx = New RegExp
regEx.Global = true
regEx.Pattern = "[^0-9a-zA-Z]"
marka=regEx.Replace(Request.Form("markaoto"), "")
tarz=regEx.Replace(Request.Form("tarz"), "")
il=regEx.Replace(Request.Form("iloto"), "")
On Error Resume Next
set marka_ad_al=conn.execute("select * from servisListMarka_V2 where markaId = "&marka)
marka_ad=marka_ad_al("marka")
If Err.Number <> 0 Then
conn.execute("insert into ErrorLogTable(CodeRowNumber,LogPage,LogString)values(103 , 'anlasmali_cam_servisleri2.asp' , 'marka=" & marka & " / tarz=" & tarz & " / il=" & il & "')")
else
set marka_ad_al=conn.execute("select * from servisListMarka_V2 where markaId = "&marka)
marka_ad=marka_ad_al("marka")
end if
set il_ad_al=conn.execute("SELECT * FROM TBL_ILLER WHERE ILKOD="&il)
il_ad=il_ad_al("IL")
If tarz = "0" Then
sql = "WITH L AS(SELECT ST.SERVICE_TYPE_ID,S.*,CAST('<M>' + REPLACE(BRAND, ',','</M><M>')+ '</M>' AS XML) AS BRAND_ID FROM SERVICE S INNER JOIN SERVICE_TYPES ST ON S.SERVICE_ID = ST.SERVICE_ID where S.IS_ACTIVE = 1 and ST.SERVICE_TYPE_ID IN (1,2,3,4,5) AND S.STATUS = 1 AND S.CITY_ID = "& il &") SELECT L.*, SPLIT.A.value('.', 'VARCHAR(100)') AS BRAND_ID FROM L CROSS APPLY BRAND_ID.nodes('/M') SPLIT(A) WHERE SPLIT.A.value('.', 'VARCHAR(100)')='" & marka & "' ORDER BY SERVICE_TYPE_ID asc,EHOM DESC , ASU DESC"
'sql = "SELECT * FROM SERVICE WHERE (BRAND LIKE '%," & marka & "%' OR BRAND LIKE '%" & marka & ",%' OR BRAND = '" & marka & "') AND CITY_ID = "& il &" AND SERVICE_TYPE = 1 AND STATUS = 1 AND IS_ACTIVE = 1 ORDER BY EHOM DESC , ASU DESC"
Else
'sql = "SELECT * FROM SERVICE WHERE (BRAND LIKE '%," & marka & "%' OR BRAND LIKE '%" & marka & ",%' OR BRAND = '" & marka & "') AND CITY_ID = "& il &" AND USAGE_STYLE LIKE '%,"& tarz &",%' AND STATUS = 1 AND IS_ACTIVE = 1 AND SERVICE_TYPE = 1 ORDER BY EHOM DESC , ASU DESC"
sql="WITH L AS(SELECT ST.SERVICE_TYPE_ID,S.*,CAST('<M>' + REPLACE(BRAND, ',','</M><M>')+ '</M>' AS XML) AS BRAND_ID FROM SERVICE S INNER JOIN SERVICE_TYPES ST ON S.SERVICE_ID = ST.SERVICE_ID where S.IS_ACTIVE = 1 and ST.SERVICE_TYPE_ID IN (1,2,3,4,5) AND S.STATUS = 1 AND S.CITY_ID = "& il &" AND USAGE_STYLE LIKE '%"& tarz &"%') SELECT L.*, SPLIT.A.value('.', 'VARCHAR(100)') AS BRAND_ID FROM L CROSS APPLY BRAND_ID.nodes('/M') SPLIT(A) WHERE SPLIT.A.value('.', 'VARCHAR(100)')='" & marka & "' ORDER BY SERVICE_TYPE_ID asc,EHOM DESC , ASU DESC"
End If
sql_uk = sql
set bul=conn180.execute(sql)
If Not bul.eof then
%>
这是发布下面表格的javascript代码;
function anlasmalioto(){
btn = document.getElementById("Image5");
btn.style.visibility = "hidden";
waiting = document.getElementById("Waiting");
waiting.style.visibility = "visible";
document.form1.submit();
}