如何从Windows服务(C#.NET)调用weblink [英] How do I call weblink from windows service (C#.NET)

查看:79
本文介绍了如何从Windows服务(C#.NET)调用weblink的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我有一个需要每隔5分钟调用一次的网络链接,并将3个变量传递给link.I需要一个解决方案,我写道一个Windows服务,但我无法使用Process.Start调用链接(https://www.service.net/values/a=3,b=4,c=4);



任何人都可以建议如何实现这一点?我不希望桌面应用程序使用浏览器控件来调用它。



提前感谢,



我尝试过:



创建Windows服务并尝试调用weblink使用(WebClient webClient = new WebClient())$ div $ {
webClient.DownloadString(new Uri( https://www.service.net/values/a=3,b=4,c=4\" ));
}


Hello,

I have a weblink that needs to be called in every 5 minutes and pass 3 variables to link.I need a solution to do ,I wrote a windows service but i was unable to call link using Process.Start("https://www.service.net/values/a=3,b=4,c=4");

Can anyone suggest How to achieve this?I dont want Desktop application to call this using browser control.

thanks in advance,

What I have tried:

Created Windows Service and tried to call weblink

解决方案

using(WebClient webClient = new WebClient())
{
    webClient.DownloadString(new Uri("https://www.service.net/values/a=3,b=4,c=4"));
}


这篇关于如何从Windows服务(C#.NET)调用weblink的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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