简体   繁体   English

经典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 )

I have created a dll in Visual Studios 2010. I have performed the following steps: 我在Visual Studios 2010中创建了一个dll。我执行了以下步骤:

  1. Given build a strong name by associating a key pair (snk file) to it 通过将密钥对(snk文件)与其关联来构建强名称

  2. Given each class an individual ProgID and GUID 给每个类一个单独的ProgID和GUID

  3. As it is a 64 bit DLL I made sure that Used the RegAsm.exe located in the 'FrameWork64/v4xxxx' folder. 由于它是64位DLL,我确保使用位于'FrameWork64 / v4xxxx'文件夹中的RegAsm.exe。 I used RegAsm.exe /codebase ECE2.dll 我使用了RegAsm.exe / codebase ECE2.dll

  4. I ran 'gacutil -i' on the DLL 我在DLL上运行'gacutil -i'

All of these steps have been successful. 所有这些步骤都取得了成功。 The DLL and the ASP page I am using it on are stored in intetpub/wwwroot. 我正在使用的DLL和ASP页面存储在intetpub / wwwroot中。

Now, the DLL works fine on my laptop and home computer (both running Windows 7 Ultimate). 现在,DLL 的作品在我的笔记本电脑和家用电脑(包括运行Windows 7旗舰版)的罚款 I am now trying to get it to work on Windows Server 2008 R2 . 我现在正试图让它在Windows Server 2008 R2上运行 This is where I'm having the problem. 这就是我遇到问题的地方。

I complete the same steps as above, all of which are successful. 我完成了与上面相同的步骤,所有这些都是成功的。 However when I run the ASP page, I'm getting an error message which would suggest it has NOT been registered, even though it has: 但是,当我运行ASP页面时,我收到一条错误消息,表明它尚未注册,即使它有:

Microsoft VBScript runtime error '800a01ad' ActiveX component can't create object: 'ECE2.CSV_DataSet' Microsoft VBScript运行时错误'800a01ad'ActiveX组件无法创建对象:'ECE2.CSV_DataSet'

I thought it might be a setting in IIS which needs changing. 我认为它可能是IIS中需要更改的设置。 Note that this server is already configured to allow Classic ASP pages, so I know it is not that. 请注意,此服务器已配置为允许经典ASP页面,所以我知道不是这样。 Could anyone give me any indication as to whether there is a particular setting I need to change in Server, or whether there are extra security hoops I have to jump through to get it working on Server 2008 which I don't need to do on Windows 7 Ultimate? 任何人都可以告诉我是否有一个特定的设置我需要在服务器中进行更改,或者是否有额外的安全箍我必须跳过才能使它在Server 2008上工作,我不需要在Windows上进行操作7终极?

Check the advanced settings of the application pool that this ASP application runs in. Does it have "Enable 32-Bit Application" set to True. 检查此ASP应用程序运行的应用程序池的高级设置。是否将“启用32位应用程序”设置为True。 If so then thats your problem you can't instantiate a 64 bit dll under a 32 bit pool. 如果是这样那么你的问题就是你无法在32位池下实例化64位dll。

Is there a reason you consider this to be a "64bit dll" instead of simple "Any CPU"? 你有没有理由认为这是一个“64位dll”而不是简单的“任何CPU”? If not regasm it also for use as a 32 bit dll. 如果没有regasm它也用作32位dll。

Otherwise you will need to run this ASP application without "Enable 32-Bit application" so that it runs as 64 bit but then there is probably a reason this is set in the first place. 否则,您将需要在没有“启用32位应用程序”的情况下运行此ASP应用程序,以便它以64位运行,但之后可能有一个原因设置在第一位。 So the next step is to create a new application pool that doesn't have this setting and make a portion of your ASP run as a seperate application in this pool. 因此,下一步是创建一个没有此设置的新应用程序池,并将ASP的一部分作为此池中的单独应用程序运行。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM