5

我在 Visual Studios 2010 中创建了一个 dll。我执行了以下步骤:

  1. 给定通过将密钥对(snk 文件)关联到它来构建一个强名称

  2. 给每个类一个单独的 ProgID 和 GUID

  3. 因为它是一个 64 位 DLL,所以我确保使用了位于“FrameWork64/v4xxxx”文件夹中的 RegAsm.exe。我使用了 RegAsm.exe /codebase ECE2.dll

  4. 我在 DLL 上运行了“gacutil -i”

所有这些步骤都已成功。我使用它的 DLL 和 ASP 页面存储在 intetpub/wwwroot 中。

现在,该 DLL在我的笔记本电脑和家用计算机(均运行 Windows 7 Ultimate)上运行良好。我现在正试图让它在Windows Server 2008 R2上工作。这就是我遇到问题的地方。

我完成了和上面一样的步骤,都成功了。但是,当我运行 ASP 页面时,我收到一条错误消息,提示它尚未注册,即使它具有:

Microsoft VBScript 运行时错误“800a01ad”ActiveX 组件无法创建对象:“ECE2.CSV_DataSet”

我认为这可能是 IIS 中需要更改的设置。请注意,此服务器已配置为允许经典 ASP 页面,所以我知道不是这样。谁能给我任何指示,说明我是否需要在服务器中更改特定设置,或者是否有额外的安全环我必须跳过以使其在 Server 2008 上运行,而我不需要在 Windows 上执行7终极?

4

1 回答 1

10

Check the advanced settings of the application pool that this ASP application runs in. Does it have "Enable 32-Bit Application" set to True. If so then thats your problem you can't instantiate a 64 bit dll under a 32 bit pool.

Is there a reason you consider this to be a "64bit dll" instead of simple "Any CPU"? If not regasm it also for use as a 32 bit 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. 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.

于 2012-07-08T19:56:50.683 回答