我需要为我的应用程序打开特定的端口。
我已经尝试INetFwAuthorizedApplication
对所有端口使用每个应用程序的规则。
fwMgr.LocalPolicy.CurrentProfile.AuthorizedApplications.Add(app)
或者,使用 .为所有应用程序打开一个端口INetFwOpenPort
。
firewallManager.LocalPolicy.CurrentProfile.GloballyOpenPorts.Add(port)
有没有办法以编程方式以编程方式仅打开每个应用程序的单个端口?我可以通过防火墙设置手动完成。