在窗口服务中使用Webbrowser [英] use webbrowser in window service

查看:83
本文介绍了在窗口服务中使用Webbrowser的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过从窗口服务传递一些参数来对网站进行搜索,然后从该网站获取这些结果.我已经很容易以窗口形式实现了这一目标.因为其中提供了网络浏览器.但是没有这样的控件或类是 在windowservice中工作. Httpwebrequest无法正常工作,因为我需要在网站上进行搜索(单击按钮).我试图使用WebClient类,通过使用此类我获得了html的url,但无法执行按钮单击. HTMLAgility在这里也不起作用. 任何帮助将不胜感激.

I want to perform  search on a website by passing some parameters from window service and then fetch those results from that website. i have achieved this easily in window forms. Because webbrowser is available in it. but no such control or class is working in windowservice. Httpwebrequest will not work becuase i need to perfrom search (a button click) on website. i have tried to use WebClient class, by using this i got html of url but not able to perform button click. HTMLAgility also not worked here. Any help will be highly appreciated.

谢谢

Sarab

推荐答案

你好,

恐怕您不能直接这样做.尝试开发一个自定义Web服务,它将为您完成此任务,并在Windows Service中引用它.

Am afraid you can't do it directly. Try to develop a custom Web Service that will do that for you and reference it in your Windows Service.


这篇关于在窗口服务中使用Webbrowser的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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