|
|
| 推广知识 |
| 苏州企业网站使用的ASP语言生成html造成IIS死锁的问题 |
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.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
|
| 发布时间:2024-04-27 14:47:34 |
点击率:1759 |
「返回上一页」 |
|
|
|