如何在Web应用程序中使用com组件? [英] How to use com components in web application?

查看:78
本文介绍了如何在Web应用程序中使用com组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
如何在Web应用程序中使用com对象?
在我的Web应用程序中,我尝试使用SpeechLib组件. Web应用程序不支持SpeechLib.但是在Windows应用程序中,我的编码正在运行.如何使我的代码在Web应用程序中运行?
在此先谢谢您.

Hi all,
How to use com objects in web application?
In my web application i tried to use SpeechLib component. Web application does not support SpeechLib. But in windows application my coding is running. What shall i do to make my code run in web application?
Thanks in advance.

推荐答案

您绝对不能在Web应用程序中使用COM组件*客户端.如果您考虑Web应用程序的工作方式以及服务器和浏览器之间的分离,那么您会明白为什么会这样(您的代码在一台计算机上运行,​​标记和客户端脚本在完全不同的浏览器中运行一).

(*:好的,如果(i)您可以保证您的用户都将使用IE,并且(ii)您可以保证他们将拥有所需的组件,则是可能的已安装,并且(iii)他们将您的站点放置在受信任的区域"中,以便可以访问ActiveX控件.在公司局域网中,这是可能的.但是您最好让他们安装桌面应用程序.)

如果您实际上想要在Web客户端中进行语音合成,则应在Silverlight和.Net Framework中使用语音合成,否则,必须让用户安装COM组件,然后他们才能使用您的网站,这将使大多数
You absolutely cannot use a COM component* client-side in a web application. If you think about how a web application works and the separation between server and browser, you''ll understand why that is (your code is running on one machine, your markup and client-side script is running in a browser on a completely different one).

(*: Okay, it is possible if (i) you can guarantee your users will all be using IE, and (ii) you can guarantee they will have the component you want installed, and (iii) they put your site in Trusted Areas so it can access ActiveX controls. In a corporate LAN this may be possible. But then you might as well make them install your desktop app instead.)

If you actually want speech synthesis in a web client, you should use Silverlight and the speech synthesis in the .Net Framework, otherwise you will have to make your users install a COM component before they can use your site, and that will turn most of them away (particularly as it''s a virus risk).


我不确定这是否对您有帮助,因为本文有点过时了:http://www.aspheute.com/english/20000828.asp [
I''m not sure if this will help you since the article is a bit outdated: http://www.aspheute.com/english/20000828.asp[^]. This is a German site, but the article is in English.

Regards,

Manfred


这篇关于如何在Web应用程序中使用com组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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