asp生成html 造成iis死锁的问题
本机程序运行一切正常。 问题出现在某一台服务器上
生成页面的机制是:
url=http://www.xxxxxx.com/moban/moban_index.asp“
htmlcode=gethttppage(url,0)
' fso生成页面
------走到这里就出问题了 gethttppage获取不了 代码
下面列下我测试的情况:
moban_index.asp 与数据库无关,就算随便写几个字进去,只要是后缀是 .asp
运行生成的程序 就造成 iis死锁
非得我上服务器重启下iis 网站才能运行。生成失败
moban_index.asp这个如果改成静态页面moban_index.html
生成的代码变成这样了
url=http://www.xxxxxx.com/moban/moban_index.html“
htmlcode=gethttppage(url,0)
就一切正常了
感觉是服务器组件问题 不晓得具体是什么问题麻烦指点下
附:服务器配置 windows2003+iis6.0sql2005.net2.0运行环境
阿江探针: http://116.252.185.35:88/aspcheck.asp
所用到的函数
function gethttppage(httpurl, coding)
on error resume next
if isnull(httpurl) = true or len(httpurl) < 18 or httpurl = then
gethttppage = $false$
exit function
end if
dim http
' set http = server.createobject(msxml2.xmlhttp)
set http = server.createobject(msxml2.serverxmlhttp)
http.open get, httpurl, false
http.send
if http.readystate <> 4 then
gethttppage = $false$
exit function
end if
if coding = 1 then
gethttppage = bytestobstr(http.responsebody, utf-8)
elseif coding = 2 then
gethttppage = bytestobstr(http.responsebody, big5)
else
gethttppage = bytestobstr(http.responsebody, gb2312)
end if
set http = nothing
if err.number <> 0 then
err.clear
end if
end function
function bytestobstr(body, cset)
dim objstream
set objstream = server.createobject(adodb.stream)
objstream.type = 1
objstream.mode = 3
objstream.open
objstream.write body
objstream.position = 0
objstream.type = 2
objstream.charset = cset
bytestobstr = objstream.readtext
objstream.close
set objstream = nothing
end function