MSHTML.dll - 如何确保跨安装计算机使用一致版本的 IE 渲染引擎
我对在线阅读的有关 MSHTML.dll 重新分发的内容感到有点困惑。
我的应用程序(这是一个消费者数据提取工具)在 WebForms 应用程序(可能最终成为 WPF)中使用 WebBrowserControl,并依赖于 MSHTML.dll。
据我了解,MSHTML.dll 的存在是为了向 .NET 提供 COM 组件的包装器,这些组件基于客户端计算机上当前安装的 IE 版本而存在。
WebBrowser 控件中呈现的网页的 DOM html 在所有安装以及每个客户端与之通信的 Web 服务器中保持一致,这一点非常重要。我担心的是,如果客户端计算机安装了不同版本的 IE(可能是 IE 6 - IE 9),则 DOM html 可能因计算机而异。
例如,服务器安装了 IE9,客户端计算机安装了 IE6,我认为 HTML 页面的 DOM 视图可能会有所不同。
有人可以澄清一下
a)这是一个合理的担忧吗?这是否如我所期望的那样工作。
b) 我可以通过重新分发组件来控制正在使用的渲染引擎版本吗?
感谢您的任何帮助。
I'm a bit confused by what I'm reading on line regarding redistribution of MSHTML.dll.
My application (this is a consumer data extraction tool) makes use of the WebBrowserControl in a WebForms app (might end up being WPF), and relies on MSHTML.dll.
As I understand it, MSHTML.dll exists to provide .NET with a wrapper around COM components that exist based on the currently installed version of IE on the client machine.
It is VERY important that the DOM html of a webpage rendered in the WebBrowser control is consistent across all installs, and a web server with which each client communicates. My concern is that if the client machines have varying versions of IE installed, potentially IE 6 - IE 9, then the DOM html could differ from machine to machine.
Say for example the server has IE9 installed, and the client machine has IE6, I'm thinking that the DOM view of an HTML page could differ.
Can someone clarify
a) is this a valid concern, does this work as I am expecting.
b) can I control the rendering engine version in use, maybe by redistributing components?
Thanks for any assistance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
免责声明:我不是这方面的专家,我最近一直在处理类似的问题。
是的,WebBrowser 控件取决于安装的 Internet Explorer 版本。
查看版本属性控制,这个:
http://blogs.msdn .com/b/ie/archive/2009/03/10/more-ie8-extensibility-improvements.aspx
您可能对 IE6 及更早版本很熟悉,但如果您让应用程序检查已安装的版本并根据需要更新注册表中的密钥,您应该能够控制这一点。
Disclaimer: I am not an expert on this, I've just been dealing with similar issues lately.
Yes, the WebBrowser control depends upon the installed version of Internet Explorer.
Look into the Version property of the control, and this:
http://blogs.msdn.com/b/ie/archive/2009/03/10/more-ie8-extensibility-improvements.aspx
You're probably SOL for IE6 and older, but if you have your application check the installed version and update the key in the registry as appropriate, you should be able to control this.