简体   繁体   English

IIS 7“ Server.CreateObject失败”

[英]IIS 7 'Server.CreateObject failed'

I've installed IIS7 on my workstation and enabled IIS6 compatibility so I can test classic asp pages (for some old projects here at work). 我已经在工作站上安装了IIS7,并且启用了IIS6兼容性,因此我可以测试经典的ASP页面(对于一些正在工作的旧项目)。

Some pages work, but others don't. 有些页面有效,而其他页面则无效。

I receive: 我收到:

Serverobject error 'ASP 0177 : 800401f3'

Server.CreateObject failed

/master.central.be/master_connection.asp, line 55

800401f3

On that line i've got: 在那条线上,我得到了:

Set dicTalenLabels = Server.CreateObject("Scripting.Dictionary")

Anybody got some ideas what todo to fix this? 有人知道如何解决这个问题吗?

Edit: 编辑:

As suggested by Michael Pryor, i've ran a vbscript with similar code and it was succesful. 正如迈克尔·普赖尔(Michael Pryor)所建议的那样,我运行了一个具有类似代码的vbscript,并且成功。 So it probably has something todo with permissions. 因此,它可能与权限有关。 Currently trying to figure out which files exactly... 目前正在尝试找出确切的文件...

Do I need to add IUSR to scrrun.dll? 我需要将IUSR添加到scrrun.dll吗? When trying, I do not have permission, although i'm a adminstrator. 尝试时,我没有权限,尽管我是管理员。

Edited: He's running 32 bit vista, so it's definitely not a 64 bit issues. 编辑:他正在运行32位Vista,所以绝对不是64位问题。

Make a test.vbs file and put this in it 制作一个test.vbs文件并将其放入其中

Dim o: Set o = CreateObject("Scripting.Dictionary") 昏暗o:设置o = CreateObject(“ Scripting.Dictionary”)

Then run it like so 然后像这样运行

cscript.exe test.vbs cscript.exe test.vbs

Does it give you the same error? 它会给您同样的错误吗?

If it does, then the regsvr32 is failing or something is wrong with the registry keys it would normally put in the registry. 如果是这样,则表明regsvr32发生故障或通常会放入注册表中的注册表项出了问题。

If it doesn't fail, it's likely that the user you have running your asp page (by default it is IUSR_machinename) doesn't have permissions on either ther registry keys it needs, or the actual .dll 如果没有失败,则可能是您正在运行asp页的用户(默认情况下为IUSR_machinename)对其所需的注册表项或实际的.dll没有权限。

0x800401f3 means that the "Scripting.Dictionary" is incorrect or not found. 0x800401f3表示“ Scripting.Dictionary”不正确或找不到。 The Scripting.FileSystemObject is provided by the same dll file, and I know that some hosts have disabled this by unregistering the dll file, which would also disable the Dictionary object. Scripting.FileSystemObject由同一个dll文件提供,并且我知道某些主机已通过注销dll文件来禁用了该功能,这也将禁用Dictionary对象。 Could you check if the Scripting.FileSystemObject works? 您可以检查Scripting.FileSystemObject是否工作吗?

Both objects are provided by Windows\\System32\\scrrun.dll (or Windows\\SysWOW64\\scrrun.dll if you're executing 32bit on 64bit host). 这两个对象都由Windows \\ System32 \\ scrrun.dll(或Windows \\ SysWOW64 \\ scrrun.dll,如果要在64位主机上执行32bit)提供。 Check the permissions on this file, and verify what privileges your asp script executes as. 检查此文件的权限,并验证您的asp脚本执行什么特权。

I've found that calls to system objects such as 我发现对诸如

set rs = server.createobject("adodb.recordset") 

and

set fs = server.createobject("scripting.filesystemobject");

sometimes fail after running fine for weeks on a production server. 在生产服务器上运行数周后,有时会失败。 It's not a great solution, but manually recycling the app pool fixes it. 这不是一个很好的解决方案,但是手动回收应用程序池可以解决此问题。 Also, setting the app pool to recycle every few hours is a way to keep it fresh. 另外,将应用程序池设置为每隔几个小时循环一次是保持更新的一种方法。 Just make sure that you don't accidentally log everyone off (if using session for credentials). 只要确保您不会意外注销所有人(如果使用会话获取凭据)即可。

It could be that the developer forgot to 'close' and 'set to nothing' the objects. 开发人员可能忘记了“关闭”对象并将其“设置为空”。 Any objects you create using 'set' need to be allowed to dispose by setting them to nothing after use. 使用“ set”创建的任何对象都需要被允许通过使用后将其设置为空来进行处置。

set rs = server.createobject("adodb.recordset")
rs.open sql, db, 1, 3       ' adOpenKeyset, adLockOptimistic
' some process here
rs.close
set rs = nothing

Take a look at: 看一眼:

Both the links are from Bill Staples' blog, he's one of the head honchos on the IIS side of things and the tips in the first link sorted me out when I was trying to get Classic ASP up and running. 这两个链接均来自Bill Staples的博客,他是IIS方面的头号人物,并且当我尝试启动和运行Classic ASP时,第一个链接中的提示使我失望。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Server.CreateObject失败aspsessionservice IIS 10 - Server.CreateObject Failed aspsessionservice IIS 10 Server.CreateObject(“Msxml2.XMLHTTP.6.0”) 使用什么 TLS 协议? - What TLS protocol does Server.CreateObject(“Msxml2.XMLHTTP.6.0”) use? IIS服务器:无法加载资源:net :: ERR_HTTP_1_1_REQUIRED - IIS server : Failed to load resource: net::ERR_HTTP_1_1_REQUIRED Angular - 加载资源失败:服务器在 IIS 中响应状态为 404 - Angular - Failed to load resource: the server responded with a status of 404 in IIS IIS服务器和Spring.NET对象实例化失败 - IIS Server and Spring.NET object instantiation failed readfile():无法打开流:Windows Server IIS 8上的权限被拒绝 - readfile(): failed to open stream: Permission denied on Windows Server IIS 8 在 IIS 服务器上运行应用程序问题,不断获取应用程序无法启动 - issue running app on IIS server, keep getting app failed to start NHibernate-创建代理实例失败(在IIS8上,但可以在dev服务器上使用) - NHibernate - Creating a proxy instance failed (on IIS8 but ok with dev server) 无法在IIS Windows 7 64位上的VB脚本中使用CreateObject - Cannot use CreateObject from VB scripts on IIS Windows 7 64Bits IIS PHP联系表单 - 无法加载资源:服务器响应状态为500(内部服务器错误 - IIS PHP Contact Form - Failed to load resource: the server responded with a status of 500 (Internal Server Error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM