开发者

.NET http network requests with Windows service

开发者 https://www.devze.com 2023-02-01 08:46 出处:网络
today i wrote a windows service which needs to send regular http requests to a server. the problem is that the service runs under the \"SYSTEM\" account as local service and as such a type of service

today i wrote a windows service which needs to send regular http requests to a server. the problem is that the service runs under the "SYSTEM" account as local service and as such a type of service it isn't allowed to access the n开发者_StackOverflow社区etwork.. for installing the service i use this class:

http://dl.dropbox.com/u/152585/ServiceInstaller.cs

is there a way to send http requests in a .net c# windows service and get the http response?


Can you not run the service under a specific identity? Or the Network Service identity?

Take a look at this: it should help: http://msdn.microsoft.com/en-us/library/ms676916(v=VS.85).aspx


I run networked services I've built as LocalSystem and have not had this problem. Perhaps it is because the domain is granting network access to computer accounts.

0

精彩评论

暂无评论...
验证码 换一张
取 消