3

How do I make my desktop application to make the user firewall (I'm looking for an answer that would work with whatever firewall the user might have installed) pop-up those questions like "this program wishes to access the internet do you want to allow it?" I'm trying to make a game (a tic tac toe, as this is my first game), and I'm using WPF and TCP (TcpListener and TcpClient).
The idea is that one player will host the server and a client, while the other player on another PC will run only a client.
I still haven't figured out completely how to go around NAT, so I just disconnect my router and connect my PC directly to my modem to test the server. I have to do the same with the other computer (the one running the client only) and I also have to disable my McAfee firewall, because it silently blocks the client trying to connect to my TcpListener.

I've checked this thing: Windows Firewall with Advanced Security Interfaces

but I'm not sure if that's how I'd solve my problem (looks like it's about Windows Firewall only) and what I'd have to do to solve it.

rene
  • 41,474
  • 78
  • 114
  • 152
user2212990
  • 177
  • 1
  • 9

1 Answers1

0

Basicly, Firewall supposed to pop up automatically (in my programs it did), but if it don't you can add firewall rules programatically, as explained here or here.

Also, consider asking Administrator authentication:

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

Good luck!

Community
  • 1
  • 1
albeck
  • 510
  • 1
  • 7
  • 16