Visual Studio 2010, TcpListener.Start, get The requested address is not valid in its context
Posted on 2010-11-16
This works on Visual Studio 2008 but not after I converted the project to 2010:
tcpListener = New TcpListener(Dns.GetHostEntry(SysName).AddressList(0), SvrPortNum)
Catch ex As Exception
' ex.Message = "The requested address is not valid in its context"
tcpListener = New TcpListener(SvrPortNum)
works. I could use it as a workaround, but dont want to.
Is there something new with VS 2010, or a bug or something? I would really like to be able to specify the address to listen on if possible.