Solved

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

Posted on 2010-11-16
2
1,186 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

746 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

12 Experts available now in Live!

Get 1:1 Help Now