Not getting any response from listening to UDP RRS feed

  • Question

  • Hi, I need to retrieve information from UDP packets. ultimately the code written will be listening to a specific upd address, but for testing I've got it to list to "Any".

    I would expect the code below to console write some data at some point but after 10 minutes or more there was nothing written. Being synchronous, it just sites there at the receive method waiting with no results.

                Dim receivingUDPClient = New UdpClient(11000)
                Dim remoteEndPoint = New IPEndPoint(IPAddress.Any, 0)
                Console.WriteLine("Listening for messages...")
                Dim receivedBytes As [Byte]() = receivingUDPClient.Receive(remoteEndPoint)
                Dim returnData = Encoding.ASCII.GetString(receivedBytes)
                Console.WriteLine("No message is being written here... " + Environment.NewLine + returnData)
            Catch ex As Exception
            End Try

    I can see the udp coming in on wireshark. not sure if that means its not being caught by the firewall but I assume it means my code should also see the packets.

    many thanks for any help here


    Monday, September 3, 2012 5:04 AM

All replies

  • the first thing I usually do is to use PING X.X.X.X as a DOS command.  From the Start menu on any other computer from Statrt - Run - CMD.EXE enter on the command line >"ping x.x.x.x"  (try both an IP address and a host name).  You may have one of the following problems

    1) The firewall or virus protection could be blocking the data

    2) You ehternet card could be configured improperly or you may have more than one ethernet card and you could be connected to a card that is disabled.

    3) You may be setup using DNS which will change you IP address every time the computer is rebooted.  Instead you should be using the Host Name instead of a fixed IP address

    First check the IP properties

       Right Click my network places

       check each local area connection

            Right click area connection and select properties

            Select Internet Protocol - double click

            If your settings are set to automatic will will get a different IP address every time you turn on your computer

    Second try the following DOS command


    The IP address and mask (subnet) should match the the address and mask gotten from 1 above.  If the mask isn't set properly you will not receive any data.  Also if the IP address that you are using to send the data doesn't match the one in your computer you will not receive the messages.

    Third check the status of the ports on the computer using the following Dos command

    Netstat -a

    Fourth check the computer name (should be same as the netstat command)

    right click MY Computer - Select Properties -Ccomputer Name - full computer Name





    Monday, September 3, 2012 8:53 AM
  • Run your program as admin as a test. Does Windows prompt you to allow it to listen through the firewall?

    http://www.alanjmcf.me.uk/ Please follow-up in the newsgroup. If I help, please vote and/or mark the question answered. Available for contract programming.

    Monday, September 3, 2012 8:39 PM