automation服务器不能创建对象

本来程序运行的挺好的,过了几天出现了“automation服务器不能创建对象”这个问题,在网上找了一下,找到两个解决方法:
一:主要是Scripting.FileSystemObject (FSO 文本文件读写)被关闭了,开启FSO功能即可,在“运行”中执行regsvr32 scrrun.dll

二:如果javascript脚本中报这个错误是因为IE的安全设置不允许运行未标记为安全的activeX控件 更改IE的安全设置,把相应的选项打开即可。
  有时用上面“解决”中所提的方法不是100%成功的,因为毕竟导致同样现象的原因并不是只会有一个,这个亦是一个思路。如果是在安装某个软件后出现这种问题,可卸载该软件或重装一下!
这个根据具体情况不同而解决方式不同,自己可以按以上两个方式解决一下。如果有别的原因和解决方法可以跟贴告诉我!

posted on 2007-04-18 17:45  Edwin dong  阅读(76833)  评论(55编辑  收藏  举报

<% Function googleColor(value, random) Dim colorArray colorArray = Split(value, ",") googleColor = colorArray(random Mod (UBound(colorArray) + 1)) End Function Function googleScreenRes() Dim screenRes, delimiter, resArray screenRes = Request.ServerVariables("HTTP_UA_PIXELS") delimiter = "x" If IsEmpty(screenRes) Then screenRes = Request.ServerVariables("HTTP_X_UP_DEVCAP_SCREENPIXELS") delimiter = "," End If resArray = Split(screenRes, delimiter, 2) If (UBound(resArray) + 1) = 2 Then googleScreenRes = "&u_w=" & resArray(0) & "&u_h=" & resArray(1) End If End Function Function googleDcmguid() Dim dcmguid dcmguid = Request.ServerVariables("HTTP_X_DCMGUID") If Not IsEmpty(dcmguid) Then googleDcmguid = "&dcmguid=" & dcmguid End If End Function Dim googleTime, googleDt, googleScheme, googleHost googleTime = DateDiff("s", "01/01/1970 00:00:00", Now()) googleDt = (1000 * googleTime) + Round(1000 * (Timer - Int(Timer))) googleScheme = "http://" If StrComp(Request.ServerVariables("HTTPS"), "on") = 0 Then googleScheme = "https://" googleHost = Server.URLEncode(googleScheme & Request.ServerVariables("HTTP_HOST")) Dim googleAdUrl, googleAdOutput googleAdUrl = "http://pagead2.googlesyndication.com/pagead/ads?" &_ "ad_type=text_image" &_ "&channel=" &_ "&client=ca-mb-pub-6539345765131754" &_ "&dt=" & googleDt &_ "&format=mobile_single" &_ "&host=" & googleHost &_ "&ip=" & Server.URLEncode(Request.ServerVariables("REMOTE_ADDR")) &_ "&markup=xhtml" &_ "&oe=utf8" &_ "&output=xhtml" &_ "&ref=" & Server.URLEncode(Request.ServerVariables("HTTP_REFERER")) &_ "&url=" & googleHost & Server.URLEncode(Request.ServerVariables("URL")) &_ "&useragent=" & Server.URLEncode(Request.ServerVariables("HTTP_USER_AGENT")) &_ googleScreenRes() &_ googleDcmguid() Set googleAdOutput = Server.CreateObject("MSXML2.ServerXMLHTTP") googleAdOutput.Open "GET", googleAdUrl, false googleAdOutput.Send Response.Write(googleAdOutput.responseText) %>