Windows Server 2008 上的 COM 安全性
我有一个 .NET 库,正在为 COM 互操作注册。在我的机器(windows 7 x64)上一切正常——我使用 regasm 注册库,并且 VBScript 可以很好地运行 CreateObject。我取消注册它并且 CreateObject 失败。正如您所期望的那样。
但是,当我将这个完全相同的库放在我的服务器(Windows Server 2008 x64)上并运行 regasm(这表明该库已正确注册)时,我无法让 VBScript 的 CreateObject 实际工作。我不断收到错误消息
800A01AD(ActiveX 组件无法创建对象)
这正是我从 COM 取消注册库时在本地机器上收到的错误。
我唯一能想到的是这是一个安全问题。 COM 中的 vi 安全性需要检查什么?
I have a .NET library that I'm registering for COM interop. Everything works fine on my machine (windows 7 x64) -- I register the library using regasm and VBScript can run CreateObject just fine. I unregister it and CreateObject fails. Just as you'd expect.
However, when I put this exact same library on my server (Windows Server 2008 x64) and run regasm (which says the library was registered correctly), I cannot get VBScript's CreateObject to actually work. I keep getting an error
800A01AD (ActiveX component can't create object)
which is the exact error I get on my local box when I unregister the library from COM.
The only thing I can come up with is that this is a security thing. What do I need to check vis a vi security in COM?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
x64 计算机上有两个版本的 Regasm.exe。听起来您使用的是 32 位版本,它仅将注册表项添加到注册表的 32 位视图 (HKLM\Software\Wow6432Node)。要使其适用于在 64 位模式下运行的代码,您还必须将其注册为 64 位代码。当然,您的 .NET 组件不得对 32 位非托管代码有任何依赖。
64 位版本位于 c:\windows\microsoft.net\framework64
或使用 32 位版本的 vbscript 引擎。
There are two versions of Regasm.exe on an x64 machine. Sounds like you used the 32-bit version, it only adds registry keys to the 32-bit view of the registry (HKLM\Software\Wow6432Node). To make it work for code that runs in 64-bit mode you'll have to also register it for 64-bit code. And of course your .NET component must not have any dependencies on 32-bit unmanaged code.
The 64-bit version is located in c:\windows\microsoft.net\framework64
Or use the 32-bit version of the vbscript engine.
您能显示用于注册 .dll 的完整命令吗?
根据这里的文章:http://www.osmstudios.com/Display.asp? Page=asp_emaildll
您应该从命令行运行以下命令:
Can you show the full command you are using to register the .dll?
according to the article here :http://www.osmstudios.com/Display.asp?Page=asp_emaildll
you should be running the following commands from the command line: