Sockets.SocketException on windows service startup on win2k3 only

S

Simon Bond

Any ideas why I might be getting this exception when Windows Server 2003
boots up?

System.Net.Sockets.SocketException: The requested name is valid, but no data
of the requested type was found
at System.Net.Dns.GetHostByName(String hostName)
at System.Runtime.Remoting.Channels.CoreChannel.GetMachineName()
at System.Runtime.Remoting.Channels.CoreChannel.GetMachineIp()
at
System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupMachineName()
at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(Int32
port)
at System.Runtime.Remoting.Channels.Tcp.TcpChannel..ctor(Int32 port)
at MyServiceName.Here.OnStart(String[] args)

Offending line of code is:

tcpChannel = new TcpChannel(8012);

It works fine if you stop and start the service manually, or if you run the
service on Windows 2000 Runtime v1.1.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top