I using Microsoft Managed AddIn Framework, to run my addin as a separate process.
It creates a process called "AddInProcess32.exe" from my plugin dll.
The plugin should able to open a port, so i should able to add it to fire wall exception application. But i can not do this.
How can i add my MAF process to fire wall exception in windows 7?
First of all, .NET Framework version is important. AddInProcess32.exe
is located under;
For .NET FW 3.5
%windir%\Microsoft.NET\Framework\v3.5\AddInProcess32.exe
For .NET FW 4.0
%windir%\Microsoft.NET\Framework\v4.0.30319\AddInProcess32.exe
Rest of the work is the same as adding any application to windows firewall. Something like below should work.
netsh advfirewall firewall add rule name=AddInProcess32 dir=in action=allow program="C:\Windows\Microsoft.NET\Framework\v3.5\AddInProcess32.exe" enable=yes profile=any
For outgoing rules, you can also use the line below;
netsh advfirewall firewall add rule name=AddInProcess32 dir=out action=allow program="C:\Windows\Microsoft.NET\Framework\v3.5\AddInProcess32.exe" enable=yes profile=any
Warning: Since AddInProcess32.exe
can be used by different applications, it may not be safe to add it to Windows Firewall. Just a warning. At least you may try to limit its permissions.