title: Windows-Service fails on net.tcp connection but console app works fine
body: <p>I built a service that imports and processes data from SQL server and inputs it into SYSPRO. Everything was working perfectly on both local machine and server as a console application. When I made the console application into a service it works perfect on my machine after giving it the proper logins. When I first put the service onto the server, it was giving me a DNS Error when I try to log into a SYSPRO client, even with the proper logins.</p>
  <pre><code>private SYSPROWCFServicesPrimitiveClient eNetSession = 
  new SYSPROWCFServicesPrimitiveClient(&quot;net.tcp://{serverName}:20000/SYSPROWCFService/Soap&quot;, 
  SYSPROWCFBinding.NetTcp);
  </code></pre>
  <p>I changed the server name to localhost, its address and local address which no longer returned a DNS error, but would not initialize the SYSPRO client. Yet it has no issue with the SQL Server which is on a different server. I think its the connection string, but not sure what I'm doing wrong as the connection string works just fine on the server as a console application. My only other guess is that the service doesn't have access to net.tcp maybe. Any thought?</p>
  <h1>UPDATE</h1>
  <p>Looks like the DNS is set up properly as I can ping the other server and itself. The same connection string is being used on both console and server and the only error message I get back from the service is in the image below.</p>
  <p><a href="https://i.stack.imgur.com/vB3bM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vB3bM.png" alt="enter image description here" /></a></p>