自动化服务器无法创建对象
我正在编写一个 C# 对象,我需要能够从 javascript 应用程序访问该对象。
var util = new ActiveXObject('Namespace.Class');
但是,当我尝试创建对象时,出现错误:“异常:自动化服务器无法创建对象。”我已经为 COM 互操作注册了对象,并且程序集已签名。
注意:这不是网页,也不会在浏览器中运行。我能够以同样的方式创建其他 COM 对象,因此我的安全设置已经设置,并且我的脚本引擎正在运行。
I am writing a C# object that I need to be able to access from a javascript application.
var util = new ActiveXObject('Namespace.Class');
However, when I attempt to create the object I get an error saying, "Exception: Automation server can't create object." I have registered the object for COM interop and the assembly is signed.
NOTE: This is NOT a webpage and is NOT being run in the browser. I am able to create other COM objects in this same way, so my security settings are already set, and my script engine is working.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我是 COM 新手。原来我没有将 com 可见设置为 true。希望这对某人有帮助!
Ok I'm just new to COM. Turns out I did not set com visible to true. Hope this helps someone!