C#中的Windows服务应用程序如何从Web应用程序中获取网格视图数据? [英] How a windows service application in C# can fetch a grid view data from web application?

查看:92
本文介绍了C#中的Windows服务应用程序如何从Web应用程序中获取网格视图数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在c#中开发了一个在后台运行的Windows服务应用程序。我在C#中开发了另一个Web应用程序。我的窗口怎么样?服务从我的web应用程序中获取网格视图数据。根据获取的数据,Windows服务需要向用户发送通知邮件。有人请帮我解决此问题。



提前致谢

Hi,

I have developed a windows service application in c# which is running in background.Also I have developed another web application in C#.How can my windows service fetch the grid view data from my web application.As per that fetched data windows service need to send notification mail to users.Someone please help me to get a solution for this.

Thanks in advance

推荐答案

您无法从Windows服务访问Web浏览器中打开的数据网格。任何浏览器都不允许任何应用程序或服务访问其中显示的数据。您需要在服务中使用HTTP Request来获取网格的HTML,然后解析该HTML以获取数据。另一个合适的解决方案是与网站一起创建Web服务或wcf服务,并使用来自Windows服务的服务。
You cannnot access datagrid open in web browser from windows service. Any browser will not allows any application or service to access the data displayed in that. You need to use HTTP Request in service to get HTML of grid and then parse that HTML to get the data. Another proper solution is to create web service or wcf service along with the website and consume that from windows service.


这篇关于C#中的Windows服务应用程序如何从Web应用程序中获取网格视图数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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