如何通过C#代码控制windowsfilewall打开或关闭 [英] How Can I control the windowsfilewall to open or close by C# code

查看:96
本文介绍了如何通过C#代码控制windowsfilewall打开或关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试从服务器访问客户端计算机时,防火墙总是阻止我。

所以我认为当我的程序启动时,它可以检查防火墙的状态。如果它打开了,我的程序可以关闭它。但我不知道该怎么做!!

When i try access the client-side computer from server,The firewall always stop me.
So I think When my program starts,it can check the firewall`s state.if it opened,my program can close it.But I have no idea how to do that!!

推荐答案

请参考这个 http://blogs.msdn.com/b/securitytools/archive/2009/08/21 /automating-windows-firewall-settings-with-c.aspx [ ^ ]


这篇关于如何通过C#代码控制windowsfilewall打开或关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆