在64位Windows Server 2008 Standard SP2 IIS 7上注册一个dll [英] Registering a dll on 64 bit Windows Server 2008 Standard SP2 IIS 7

查看:490
本文介绍了在64位Windows Server 2008 Standard SP2 IIS 7上注册一个dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



项目中更改了以下项目:



属性/ AssemblyInfo .cs
[assembly:ComVisible(true)]



项目/属性/构建选项卡:
注册Com for Interop:checked
生成Seralization程序集:auto



我已经使用接口,comvisible = true和guids等设置了后续的测试类:
使用4.0框架和Visual Studio 2010构建ASP Classic的COM互操作库



我可以通过regasm在本地机器上注册这个DLL。
C:\windows\Microsoft.Net\Framework\v4.0.30319> regasm NrccuaComFileSystem.dll



已成功注册类型。



在服务器regsvr上,regasm,regasm与tlb都会失败并显示以下消息:



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



我在这里做错什么?



是否在寻找一个条目点,如果是,那么完全失去了如何提供。



看下面的帖子还...
使用COM + .Net Interop 64位Windows Server的常规ASP 2008 IIS 7 Server.CreateObject失败



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



谢谢。

解决方案

现在正在工作。以下帖子有帮助。



经典ASP使用COM + .Net Interop 64位Windows Server 2008 IIS 7 Server.CreateObject失败



我们需要安装.net框架的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工具> gacutil / i C:\Windows\Microsoft.NET\Framework\v4.0.30319\File.dll



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



regasm / tlb File.dll


Project: VS2010 C# Class Library. Local machine: Win 7 64bit

Following items changed in the project:

Properties/AssemblyInfo.cs [assembly: ComVisible(true)]

Project/Properties/Build tab: Register Com for Interop: checked Generate Seralization assembly: auto

I have setup the test classes per following post with interfaces, comvisible=true and guids etc: Building a COM interop library for ASP Classic using 4.0 framework and Visual Studio 2010

I was able to register this dll on my local machine via regasm. C:\windows\Microsoft.Net\Framework\v4.0.30319>regasm NrccuaComFileSystem.dll

Types registered successfully.

On the server regsvr, regasm, regasm with tlb all fail with the following message:

RegAsm : error RA0000 : Could not load file or assembly 'file:///c:\Windows\Micr osoft.NET\Framework\v4.0.30319\NrccuaComFileSystem.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

What am i doing wrong here?

Is it looking for an entry point, if yes then totally lost as how to provide that.

Looked at the following post also... Classic ASP using COM+ .Net Interop 64 Bit Windows Server 2008 IIS 7 Server.CreateObject Fails

You can download the test project from here: http://bit.ly/wt5iJz

Thanks.

解决方案

It is working now. Following post helped.

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

We needed to install the windows sdk for .net framework 4

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

Then we needed to add the assembly to the 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

Then we needed to register the assembly with regasm

regasm /tlb File.dll

这篇关于在64位Windows Server 2008 Standard SP2 IIS 7上注册一个dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆