windows service network connection issue

  • Thread starter Thread starter George Jin
  • Start date Start date
G

George Jin

My windows service program can not connect to the internet. But if it runs
as a stand along program, it looks perfectly and can connect internet. ANy
one knows why my windows service can not connect the the internet? and even
can not resole the host name by dns! following is my code snippet
HttpWebRequest aRequest = (HttpWebRequest)WebRequest.Create(uri);

aRequest.GetResponse();
 
I'm just guessing here, but does your Windows service run with any special
credentials or are you running it under the local System account?
 
a known problem when connecting via code to a network interface is
proxies. try to use the .NET proxy class in your code. Hope that
helps...
 
Back
Top