从 Silverlight 应用程序访问 COM?
在我的公司,我们开发了一款软件,很多人都想在自己的应用程序中使用它。因此,我们有一组 COM 命令,可以从托管代码中调用这些命令来加载文件、获取结果等。
客户有兴趣创建自己的基于 Silverlight 的应用程序/网站,该应用程序/网站将通过 COM 与我们的软件进行交互。如果说我们的软件与他们的 Silverlight 应用程序一起安装在他们的服务器上,是否有可能进行通信?我在网上发现有关 COM 与 Silverlight 的文献非常令人困惑,并且可以在正确的方向上使用一点。
需要采取哪些步骤来建立一个基本示例来表明至少可以进行通信?
预先感谢各位。
At my company we have produced a piece of software that a lot of people want to use in their own applications. As such, we have a set of COM commands that can be called from managed code to load in files, get results etc.
A customer is interested in creating their own Silverlight-based application/website which would interface with our software via COM. Is it possible, if say our software was installed on their server along with their Silverlight application that communication could take place? I'm finding the literature online about COM with Silverlight pretty confusing and could use a point in the right direction.
What steps are required to set up say a basic example showing that communication is at least possible?
Thanks in advance guys.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我看来,一个潜在的解决方案是在服务器上安装 COM 组件,然后在主机网站中创建启用 Silverlight 的 WCF 服务,该服务将公开 Silverlight 应用程序所需的一组方法。
然后,Silverlight 应用程序可以引用 WCF 服务。然而,这里的地表之下隐藏着许多岩石。
目前,让 Silverlight 应用程序直接访问 COM 组件(无需 WCF 服务)需要将 Silverlight 应用程序安装在具有提升信任模式的浏览器外客户端计算机上。当然,还需要在每个客户端上安装 COM 组件。
也许 Silverlight 5 可以考虑您的考虑。借助 Silveright 5,您的客户可以使用组策略对浏览器托管的 silverlight 应用程序应用更高的信任。他们也可能使用组策略在客户端计算机上安装您的 COM 组件。
这里有很多如果和但是,你需要确定一些变量。回答“我有一个客户……”之类的问题总是很棘手。
It sounds to me that a potential solution is for your COM component to be installed on the server and then a Silverlight-Enabled WCF Service could be created in the host website that would expose a set of methods needed by the Silverlight application.
The Silverlight application could then reference the WCF Service. However there are many rocks hidden below the surface here.
Having the Silverlight Application access the COM component directly (without the WCF Service) would currently require that the Silverlight application be installed on the client machines in Out-of-browser with Elevated trust mode. Of course it would also require that the COM component be installed on each client as well.
Perhaps Silverlight 5 can factor in your consideration. With Silveright 5 it may be possible for your customer to apply elevated trust to a browser hosted silverlight application using Group Policy. They could potentially use Group Policy to install your COM Component on the client machines as well.
There are lots of ifs and buts here you need to nail some of the variables. Its always tricky answering a "I have a customer that..." sort of question.