Solved

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

Posted on 2010-11-16
2
1,189 Views
Last Modified: 2012-05-10
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
Comment
Question by:MikeBroderick
  • 2
2 Comments
 

Author Comment

by:MikeBroderick
ID: 34146676
Also, the machine is Windows 7, 64 bit.
0
 

Accepted Solution

by:
MikeBroderick earned 0 total points
ID: 34148883
Oops. It works fine. It was something I was doing. Sorry.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now