Search code examples
.netnetworkingtcpantivirusmcafee

Mcafee blocks Tcp connection


I am using System.Net.Sockets.Socket.Connect to connect a remote server.

I see that the call succeeds on most of the systems, but fails on a few.

I tried to debug the issue and observe that system which have McAfee Antivirus installed have the issue. Connection succeeds, if I disable 'Access protection' feature in the Virus scan console of McAfee.

But as per the client policy, I cannot disable the 'Access protection' feature of McAfee. As per them, they are able to run other programs which does TCP socket connection with other servers.

What might be wrong specific to my application? Is there a way to specify to bypass blocking of my application?


Solution

  • The problem is your antivirus is blocking your application. If you want to specifically allow you application. follow the below steps:

    Step 1: In McAfee antivirus folder from start button go to virusscan console.

    Step 2: Double click on access protection from virusscan console. Now select on Ant-virus standard protection. From the window right to it select Prevent IRC Communication and click Edit.

    Step 3: A new window will be opened. In that there is an field to enter Processes to Exclude. Enter your exe file name. eg: myApplication.exe. Then click apply this will solve your issue.