UDPClient not receiving multicast data C# ASP.net

Yesterday my C# ASP.net application worked great and I was receiving UDP multicast data no problems.

Today, our server was down (unknown reason), so we rebooted it.

We re-added the routes using the route ADD command (not sure how they were lost to begin with)

We see the data coming to our NIC, and the NIC sees the UDP packets information as provided by MS server 2012 Remote Access and Routing information.

However, the C# Application no longer receives any data. The data arrives to the NIC, but doesn't seem to make it to the application.

My code is as follows for the UDP listener.

 UdpClient client = new UdpClient();
                IPAddress newaddress = IPAddress.Parse(anOPRA.RTMultiCastGroup[multicastCount, 0]);
                multiport = int.Parse( anOPRA.RTMultiCastGroup[multicastCount,1]);
                IPEndPoint localEp_time = new IPEndPoint(localIP, multiport);
                client.ExclusiveAddressUse = false;
                client.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
                client.ExclusiveAddressUse = false;
                client.DontFragment = true;
                myDataHub.Send("BufferSize ", client.Client.ReceiveBufferSize.ToString());


Any ideas what could be wrong, this is so frustrating I can't figure it out.


Are you running in debug mode? If so, try running in release mode. I had the same issue (I'm using VS2012 Express) and this resolved my problem.

Need Your Help

Entity Framework - Expecting non-empty string for 'providerInvariantName' parameter

c# .net entity-framework ado.net

Ok, this may not be related to EF. I am trying to use the code-first feature and following is what I wrote:-