简体   繁体   English

CreateServer不会在Windows 2008 R2的vbscript中创建对象

[英]CreateServer will not create object in vbscript on Windows 2008 R2

I have read a few solutions for this problem but none of them have worked for me. 我已经阅读了一些解决此问题的方法,但是没有一个对我有用。 One of the main problems is that I am fairly sure I have a 32-bit dll that I am trying to use and I am trying to run it on a 64-bit server. 主要问题之一是,我非常确定自己有一个32位dll试图使用,并且正在64位服务器上运行。 Also I do not have the source code for the Interop dll. 另外,我没有Interop dll的源代码。 Most of the solutions I found involved making changes to the DLL and recompiling. 我发现的大多数解决方案都涉及对DLL进行更改并重新编译。

I have registered this dll using RegAsm.exe. 我已经使用RegAsm.exe注册了该dll。 The dll resides in the C:\\Windows\\SysWOW64 folder. 该dll驻留在C:\\ Windows \\ SysWOW64文件夹中。 It appeared to have registered fine, there were no errors. 它似乎已注册好,没有错误。

I am trying to migrate a classic ASP web site from Windows Server 2003 (IIS 6) to Windows Server 2008 R2 (IIS 7.5). 我正在尝试将经典的ASP网站从Windows Server 2003(IIS 6)迁移到Windows Server 2008 R2(IIS 7.5)。

One solution I found mentioned something about creating a VBS script and running that in the SysWOW64 folder. 我发现的一个解决方案提到了一些有关创建VBS脚本并在SysWOW64文件夹中运行该脚本的内容。 I'm not sure why running the script in the SysWOW64 folder was important but I did it anyway. 我不确定为什么在SysWOW64文件夹中运行脚本很重要,但是无论如何我还是这么做了。 I still cannot create the object. 我仍然无法创建对象。

I just copied and pasted code from my classic ASP page into the VBS script and added the Wscript.echo command. 我只是将代码从经典ASP页面复制并粘贴到VBS脚本中,并添加了Wscript.echo命令。

Below is my VBS script. 以下是我的VBS脚本。

Dim objCrypt, Key, UID, Pwd
Set objCrypt = CreateObject("MyEncryptionTool.Crypt")
Key = "1234" ' Encryption Key

UID = "äRŸê¬ÈH­" 
Pwd = "á@‰ë•ÆW¬"

Wscript.echo "UID: " & objCrypt.Decrypt(UID, Key) & vbCrLf & "Pwd: " & objCrypt.Decrypt(Pwd, Key)

The error message that CScript.exe produces is: CScript.exe产生的错误消息是:

C:\Windows\SysWOW64\CryptTest.vbs(2, 1) Microsoft VBScript runtime error: ActiveX component can't create object: 'MyEncryptionTool.Crypt'

This is essentially the same error I am getting in my classic ASP page. 本质上,这与我在经典ASP页面中遇到的错误相同。

I am fairly sure it was compiled 32-bit and Windows Server 2008 is 64-bit and that may be the source of my problem right there. 我相当确定它是32位编译的,而Windows Server 2008是64位的,这也许就是我问题的根源。

Is it possible to use a 32-bit dll on Windows Server 2008 R2? 是否可以在Windows Server 2008 R2上使用32位dll?

I should have posted the answer to this back in December 2014 when I figured it out. 我本应该在2014年12月发布答案的。 It was a stupid operator error. 这是一个愚蠢的操作员错误。 There are two dll files for the company's encryption tool. 该公司的加密工具有两个dll文件。 One has the prefix "interop." 一个有前缀“ interop”。 and the other doesn't. 另一个没有。

I was using the one with the "interop." 我当时使用的是带有“互操作”的计算机。 prefix because at the time that was the only dll I knew about. 前缀,因为当时那是我所知道的唯一的dll。 I found the version without the prefix and registered it with no problem and everything works. 我找到了没有前缀的版本,并毫无问题地注册了它,一切正常。 This came about when I finally found some documentation on the company's encryption tool and it never mentioned the dll with the prefix. 这是在我终于找到有关该公司的加密工具的文档时出现的,并且它从未提及带有前缀的dll。

暂无
暂无

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

相关问题 经典ASP和COM DLL在Server 2008 R2中不起作用(Microsoft VBScript运行时错误'800a01ad'ActiveX组件无法创建对象) - Classic ASP and COM DLL Does not work in Server 2008 R2 (Microsoft VBScript runtime error '800a01ad' ActiveX component can't create object ) 在Windows 2008 R2中注册密码过滤器后没有结果 - No result after registering my password filter in Windows 2008 R2 在Windows Server 2008 R2上注册DLL文件 - Register DLL file on Windows Server 2008 R2 Crystal Reports使用SAP Crystal Reports 2013 Viewer将现有应用程序从Windows Server 2008 R2升级到2012 R2的问题 - Issue with Crystal Reports upgrading existing app from Windows Server 2008 R2 to 2012 R2 with SAP Crystal Reports 2013 Viewer 无法在具有完全权限控制的Windows 2008 R2中加载DLL - Fail to load DLL in Windows 2008 R2 having full permissions control 如何在Windows Server 2008 R2中停止自定义DLL的实例? - How do I stop an instance of a custom DLL in Windows Server 2008 R2? CFX_ImageCR3 | 无法在运行 ColdFusion 10 64 位的 Windows Server 2008 R2 64 位上加载库 - CFX_ImageCR3 | Unable to Load Library on Windows Server 2008 R2 64-Bit running ColdFusion 10 64 Bit Windows 2012 R2 32位SNMP扩展代理 - Windows 2012 R2 32-bit SNMP extension agent 在Windows Server 2012 r2上部署时出现BadImageFormatException - BadImageFormatException when deploying on windows server 2012 r2 SQL Server报告2008 R2报告服务-调试自定义程序集 - SQL Server Report 2008 R2 Report Services - debug a custom assembly
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM