Код: Выделить всё
private void StartReceivingData(string ipAddress, int iPort)
{
try
{
if (!_bContinueReciving)
{
//initializeMainSocket(ipAddress, iPort);
_mSocket = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.IP);//
Подробнее здесь: [url]https://stackoverflow.com/questions/10461257/an-attempt-was-made-to-access-a-socket-in-a-way-forbidden-by-its-access-permissi[/url]