同一个ashx get 请求
用浏览器的网址输入请求就返回正确结果
用程序的http请求就返回下面一大堆东西
没有分了。。只能发在非技术区
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>身份认证系统</title>
<style type="text/css">
body { margin: 0px; font-size: 12px; background: #F8F8F8; }
.logindiv_bj { height: 265px; width: 800px;; top: 50%; left: 50%; position:absolute; z-index:100; margin-top: -150px; margin-left: -400px; }
.logindiv { height: 265px; width: 500px; margin: 0px auto; }
.logindiv ul { margin: 0px; padding: 0px; list-style: url(none) none; }
.logindiv ul li { border-top: 1px solid #333; border-right: 1px solid #333; border-left: 1px solid #333; margin: 0px; padding: 0px; }
</style>
</head>
<body style="overflow:scroll;overflow:hidden;" onLoad="init()">
<form id="form1" method=post>
<div class="logindiv_bj">
<div class="logindiv">
<ul>
<li style="background-color:#F0F0F0;"><img src="images/title.jpg" /></li>
<li style=" padding:30px;">
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td width="94" align="right">用户名: </td>
<td width="386" align="left">
<input name="username" id="username" type="text" size="20" style="width:200px ">
</td>
</tr>
<tr>
<td align="right" nowrap="nowrap" class="formtxt">密 码: </td>
<td align="left" nowrap="nowrap" class="formtxt">
<input id="passwd" name="passwd" type="password" size="22" style="width:200px ">
<input id="pwd" type="hidden" name="pwd" value="">
</td>
</tr>
<tr>
<td colspan="2" align="center">
<div style="padding:10px 150px 10px 10px;">
<input style="CURSOR: hand; height:26px; width:50px;" type="submit" onclick="javascript:return onApply();" value="登 录" >
<input style="CURSOR: hand;height:26px; width:50px;" type="reset" value="清 空">
</div>
</td>
</tr>
</table>
</li>
<li style="border-bottom:1px solid #333; padding:10px;" ><span style="color:#F30; ">提示信息:</span><span id="err_info" style=" color:#666">在您使用网络之前,需要进行验证。</span></li>
</ul>
</div>
</div>
</div>
<script>
function onApply()
{
var str;
str = document.getElementById("passwd").value
str = str.replace(/ /g, "%20");
document.getElementById("pwd").value = str;
str = document.getElementById("username").value
str = str.replace(/ /g, "%20");
document.getElementById("username").value = str;
document.getElementById("passwd").value = "********";
return true;
}
function init()
{
var r = window.location.search;
if(r.length > 0)
{
var msg = r.indexOf("&authresult=");
if(msg >0)
{
msg = r.substring(msg+12);
msg = msg.replace("%40","@");
if(document.all){
document.getElementById("err_info").innerText=decodeURI(msg);
}
else document.getElementById("err_info").textContent=decodeURI(msg);
res = decodeURI(msg);
start =res.indexOf("(");
end = res.indexOf(")");
if(start >=0 && end > start)
document.getElementById("username").value=res.slice(start+1,end); //fix bug 13208
}
}
}
</script>
</form>
</body>
</html>
------解决思路----------------------
你的意思是服务器端是你自己写的?
如果不是,谈不上劫持。你应该按照人家服务器端的要求去编写客户端访问代码。
------解决思路----------------------
你要把你用浏览器访问的源代码给我贴一下