Calling Web Page from Windows Service

Posted by David Moorhouse on Stack Overflow See other posts from Stack Overflow or by David Moorhouse
Published on 2010-05-11T04:13:44Z Indexed on 2010/05/11 4:24 UTC
Read the original article Hit count: 559

Filed under:
|
|
|

I have a Windows 2008 server. This has an instance of IIS7 installed and a website, accessible only via an internal hostname defined in the the servers hosts file.

e.g. the server IP is 10.0.6.11 and the hosts file contains an entry 10.0.6.11 hl7.ourname.org

I would like to call a URL on the website, e.g "http://hl7.ourname.org/updatestatus" from a Windows service.

I can call the web site from an instance of IE7 running on the server. However, if try to call it from a Windows service I get a "Socket Error # 10061 Connection refused."

This looks like a permission issue. The service is running as "Network Service" ,but maybe I should be running as a different user.

Thanks

© Stack Overflow or respective owner

Related posts about Windows

Related posts about server