Sockets.SocketException on windows service startup on win2k3 only

  • Thread starter Thread starter Simon Bond
  • Start date Start date
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.
 
Back
Top