资讯中心
News
上海企业网站使用的ASP语言生成html造成IIS死锁的问题
发布时间:2019-01-18 23:54   您所在的位置: 网站首页 > 新闻资讯 > 行业动态
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
所用到的函数

  1. Function GetHttpPage(HttpUrl, Coding)
  2.    On Error Resume Next
  3.     If IsNull(HttpUrl) = True Or Len(HttpUrl) < 18 Or HttpUrl = "" Then
  4.         GetHttpPage = "$False$"
  5.         Exit Function
  6.     End If
  7.     Dim Http
  8. '    Set Http = Server.CreateObject("MSXML2.XMLHTTP")
  9.         Set Http = Server.CreateObject("MSXML2.serverXMLHTTP")
  10.     Http.Open "GET", HttpUrl, False
  11.     Http.Send
  12.     If Http.Readystate <> 4 Then
  13.         GetHttpPage = "$False$"
  14.         Exit Function
  15.     End If
  16.     If Coding = 1 Then
  17.         GetHttpPage = BytesToBstr(Http.ResponseBody, "UTF-8")
  18.     ElseIf Coding = 2 Then
  19.         GetHttpPage = BytesToBstr(Http.ResponseBody, "Big5")
  20.     Else
  21.         GetHttpPage = BytesToBstr(Http.ResponseBody, "GB2312")
  22.     End If
  23.    
  24.     Set Http = Nothing
  25.     If Err.Number <> 0 Then
  26.         Err.Clear
  27.     End If
  28. End Function

  29. Function BytesToBstr(Body, Cset)
  30.     Dim Objstream
  31.     Set Objstream = Server.CreateObject("adodb.stream")
  32.     Objstream.Type = 1
  33.     Objstream.Mode = 3
  34.     Objstream.Open
  35.     Objstream.Write Body
  36.     Objstream.Position = 0
  37.     Objstream.Type = 2
  38.     Objstream.Charset = Cset
  39.     BytesToBstr = Objstream.ReadText
  40.     Objstream.Close
  41.     Set Objstream = Nothing
  42. End Function
本文章由新概念互动原创,如没特殊注明,转载请注明来自:http://www.jianzhan0.com/dongtai/22548.html