简体   繁体   English

Windows Service WebBrowser文档已完成的错误

[英]Windows Service WebBrowser DocumentCompleted Bug

I've been building a Windows Service to create a WebBrowser object to navigate, login, and download a site's HTML. 我一直在构建Windows服务,以创建WebBrowser对象来导航,登录和下载网站的HTML。 However, I recently discovered this bug which prevents the DocumentCompleted event from firing if the WebBrowser is not visible: 但是,我最近发现了此错误,如果WebBrowser不可见,该错误会阻止DocumentCompleted事件触发:

http://support.microsoft.com/kb/259935 http://support.microsoft.com/kb/259935

I've got to assume this is because the Windows Service doesn't allow for a GUI and therefore this bug is tripped. 我必须假定这是因为Windows Service不允许使用GUI,因此该错误已被触发。 What is the best workaround for this? 最好的解决方法是什么? Thanks for your help. 谢谢你的帮助。

You can also use httpWebRequest for this. 您也可以使用httpWebRequest But its time consuming job while developing. 但是它在开发时很耗时。 Wont this help? 需要这个帮助吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM