windows - 在 64 位 Windows Server 2008 Standard SP2 IIS 7 上注册 dll

标签 windows dll com

项目:VS2010 C# 类库。 本地机器:Win 7 64位

项目中更改了以下项目:

属性/AssemblyInfo.cs [程序集:ComVisible(true)]

项目/属性/构建选项卡: 为 Interop 注册 Com:选中 生成序列化程序集:自动

我已经按照以下帖子设置了测试类,其中包含接口(interface)、comvisible=true 和 guid 等: Building a COM interop library for ASP Classic using 4.0 framework and Visual Studio 2010

我能够通过 regasm 在我的本地计算机上注册这个 dll。 C:\windows\Microsoft.Net\Framework\v4.0.30319>regasm NrccuaComFileSystem.dll

类型注册成功。

在服务器上,regsvr、regasm、带有 tlb 的 regasm 均失败并显示以下消息:

RegAsm:错误 RA0000:无法加载文件或程序集“file:///c:\Windows\Micr” osoft.NET\Framework\v4.0.30319\NrccuaComFileSystem.dll' 或其依赖项之一。不支持操作。 (HRESULT 异常:0x80131515)

我在这里做错了什么?

它是否正在寻找一个入口点,如果是,那么完全迷失了如何提供它。

还看了下面的帖子... Classic ASP using COM+ .Net Interop 64 Bit Windows Server 2008 IIS 7 Server.CreateObject Fails

您可以从这里下载测试项目: http://bit.ly/wt5iJz

谢谢。

最佳答案

现在正在运行。以下帖子有帮助。

Classic ASP using COM+ .Net Interop 64 Bit Windows Server 2008 IIS 7 Server.CreateObject Fails

我们需要安装 .net Framework 4 的 Windows sdk

http://www.microsoft.com/download/en/confirmation.aspx?id=8279

然后我们需要将程序集添加到 GAC

C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools>gacutil/i C:\Windows\Microsoft.NET\Framework\v4.0.30319\File.dll

然后我们需要使用 regasm 注册程序集

regasm/tlb 文件.dll

关于windows - 在 64 位 Windows Server 2008 Standard SP2 IIS 7 上注册 dll,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9381707/

相关文章:

windows - 在 Windows 10 64 位中注册 DLL 而不将其移动到 System32

delphi - 使用 dll 的接口(interface)安全吗

c# - Tlbimp 无法生成互操作 Dll

python - 安装anaconda后无法导入排列

php - 从旧的 mysql 文件夹中获取旧的 MySQL 数据并导入到新数据库中

windows - 当我们更改文件的扩展名时究竟会发生什么?

c - 哪个头文件加载 Win32 api 中的 DLL?

c++ - Iaccessible接口(interface)的accLoacation()方法中的参数如何初始化?

c++ - MFC 应用程序在 CRecentFileList::Add 命令行 FileOpen 处断言失败

c - 尝试了解 GCC 和 Windows 的主要功能