• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1315
  • Last Modified:

Visual Studio 2010, TcpListener.Start, get The requested address is not valid in its context

This works on Visual Studio 2008 but not after I converted the project to 2010:

        Try
            tcpListener = New TcpListener(Dns.GetHostEntry(SysName).AddressList(0), SvrPortNum)
            tcpListener.Start()
        Catch ex As Exception
           ' ex.Message = "The requested address is not valid in its context"
        End Try

The  statement
          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.

Thanks
0
MikeBroderick
Asked:
MikeBroderick
  • 2
1 Solution
 
MikeBroderickAuthor Commented:
Also, the machine is Windows 7, 64 bit.
0
 
MikeBroderickAuthor Commented:
Oops. It works fine. It was something I was doing. Sorry.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now