公司网站运用的ASP说话生成html造成IIS死锁的题目
发布时间:06/10 来源:未知 浏览:
关键词:
本机程序运转一切正常。 题目涌现在某一台服务器上
生成页面的机制是:
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.0 SQL2005 .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