COM+不同分区中的对象激活
我创建了一个 COM+ 域分区,然后将其映射到 Windows 2008 服务器计算机,并将 COM+ 应用程序导入其中。
我尝试使用以下 C# 代码远程激活服务器上特定分区中的对象:
//partition guid
Guid guidMyPartition = new Guid("41E90F3E-56C1-4633-81C3-6E8BAC8BDD70");
//parition moniker
string uri= "partition:{" + guidMyPartition + "}/new:MyObject";
Type t = Type.GetTypeFromProgID("MyObject", "MyServer");
MyObject obj = (MyObject)Activator.GetObject(t, uri);
但出现此异常:
无法创建通道接收器来连接到 URL“partition:{41e90f3e-56c1-4633-81c3-6e8bac8bdd70}/new:MyObject”。可能尚未注册适当的频道。
有谁知道如何完成这样的激活?
I had created a COM+ domain partition then mapped it to a Windows 2008 server machine and imported a COM+ application into it.
I tried using the following C# code to activate an object from that specific partition on the server remotely:
//partition guid
Guid guidMyPartition = new Guid("41E90F3E-56C1-4633-81C3-6E8BAC8BDD70");
//parition moniker
string uri= "partition:{" + guidMyPartition + "}/new:MyObject";
Type t = Type.GetTypeFromProgID("MyObject", "MyServer");
MyObject obj = (MyObject)Activator.GetObject(t, uri);
But I get this exception:
Cannot create channel sink to connect to URL 'partition:{41e90f3e-56c1-4633-81c3-6e8bac8bdd70}/new:MyObject'. An appropriate channel has probably not been registered.
Does anybody know how such an activation can be accomplished?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保您的 Com 是公开且可见的。为此,请添加这些
标记到您的 Com 类:
确保您的 COM 已注册。您可以使用命令行来执行此操作:
Make sure your Com is public and visible. To do this, add these
tags to your Com class:
Make sure your COM has been registered. You can do this using the command line: