+ -
当前位置:首页 → 问答吧 → asp的程序报错,求助

asp的程序报错,求助

时间:2011-08-30

来源:互联网


代码
if request.form.count>0 then
if Request.ServerVariables("SERVER_PORT")<>"80" then
LoginUrl = "http://"&Request.ServerVariables("LOCAL_ADDR")& ":" & Request.ServerVariables("SERVER_PORT")& Request.ServerVariables("URL")&"?"&request.QueryString
else
LoginUrl = "http://"&Request.ServerVariables("LOCAL_ADDR")& Request.ServerVariables("URL")&"?"&request.QueryString
end if
end if


报错
ASP服务器发现运行时错误:
错 误 码:0x800A01CA
错误代码:LoginUrl = "http://"&Request.ServerVariables("LOCAL_ADDR")& ":" & Request.ServerVariables("SERVER_PORT")& Request.ServerVariables("URL")&"?"&request.QueryString
错误描述:变量使用了一个 VBScript 中不支持的 Automation 类型


我从网上查到加了
if request.form.count>0 then
end if

结果还是报错



作者: xinnian25   发布时间: 2011-08-30

request.QueryString后面在没东西了?

作者: wxr0323   发布时间: 2011-08-30

LoginUrl = "http://"&Request.ServerVariables("LOCAL_ADDR")& ":" & Request.ServerVariables("SERVER_PORT")& Request.ServerVariables("URL")&"?"&request.QueryString
else
LoginUrl = "http://"&Request.ServerVariables("LOCAL_ADDR")& Request.ServerVariables("URL")&"?"&request.QueryString
先把这段代码去掉试下

如果是上面这段代码所为,请把里面的取值用变量取好,定义好后拼接字符串,


可以一步一步来,即时查看变量 值是否正确

作者: ajaxtop   发布时间: 2011-08-30

引用 1 楼 wxr0323 的回复:

request.QueryString后面在没东西了?


没了

作者: xinnian25   发布时间: 2011-08-30

引用 2 楼 ajaxtop 的回复:

LoginUrl = "http://"&amp;Request.ServerVariables("LOCAL_ADDR")&amp; ":" &amp; Request.ServerVariables("SERVER_PORT")&amp; Request.ServerVariables("URL")&amp;"?"&amp;request.QueryString
else
LoginUr……


删了,就跳过,不报错了。

这个源码有问题我看。但这个网站现在公司在用的啊,怎么会有这个问题



作者: xinnian25   发布时间: 2011-08-30