Click here to Skip to main content
11,494,407 members (66,701 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# .NET Network TCP/IP
Hye Everyone,

I need to know, if these things can be done and (if yes) how they can be done through C# code :

1. to detect if any firewall is running on System.
2. to detect if any particular port (let say 9001) is blocked (outbound/inbound)
and if yes; how to know if its outgoing blocked or incoming blocked.
3. to detect if my IP Address is blocked by ISP or not.


Please, do reply..
its urgent.

FYI : (My application is on .NET Framework 4.0 (VS 2010))

thanks in advance..
Posted 23-Mar-12 4:37am
Edited 23-Mar-12 4:52am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
v4
Comments
DeepsMann at 26-Mar-12 3:43am
   
Thanks..
Can u please tell me how to use

INetFwMgr.IsPortAllowed
Shahin Khorshidnia at 26-Mar-12 9:23am
   
INetFWMgr is an interface and you can use Activator.
for example:
INetFwMgr mgr = (INetFwMgr)Activator.CreateInstance(NetFwMgrType);

For more detail look at the updated answer.
DeepsMann at 26-Mar-12 6:18am
   
Can i configure ip address of my system from my application???
Shahin Khorshidnia at 26-Mar-12 9:25am
   
Yes. and look at the updated solution for "How"
Shahin Khorshidnia at 26-Mar-12 9:26am
   
And also, if the solution and links help, You can accept the solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Dnyaneshwar@Pune 740
1 Sergey Alexandrovich Kryukov 443
2 CHill60 350
3 Nakul Chaudhari 236
4 OriginalGriff 221
0 Sergey Alexandrovich Kryukov 10,277
1 OriginalGriff 8,805
2 Sascha Lefèvre 3,704
3 Maciej Los 3,392
4 Richard Deeming 2,500


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 26 Mar 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100