Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have project about subscription system using C#

I need to install a server program on a server and a client on the client machine

How can I prevent the user from accessing the internet before they install my client application?

By default, all users on the network must be prevented from accessing the internet until they install my client and be authenticated.

I need C# code that can do this.

I don't want to use a proxy; only my program.


migration rejected from Feb 17 '15 at 19:11

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as not a real question by John Gardeniers, Dennis Williamson, Sam, Chopper3, womble Jan 13 '10 at 21:20

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

First, how can we help you use punctuation? – James Kolpack Jan 12 '10 at 2:15
If you're in a position to install Internet blocking software on the clients until they install your program, why not just install your program? – itowlson Jan 12 '10 at 2:19
This sounds like a request for Internet blocking software (though I could be wrong) -- voting to migrate to – itowlson Jan 12 '10 at 2:19
Proxy Server + your application sets up proxy settings correctly? – Anon. Jan 12 '10 at 2:23
How can you have any control over their computer before installing your application? That's just not possible. You can't put the controls in your application and NOT HAVE IT INSTALLED and affect the client, which is basically I believe what you're asking. – Mark Henderson Jan 12 '10 at 2:58

Don't plug-in their network cable, and turn off wifi.

+1,000,000 (if I could). Simple, practical, and pretty much the only way to do it – Mark Henderson Jan 12 '10 at 2:59
I actually tried to have a serious think about this problem, and came to the conclusion that this is the only real way. – Alex Jan 12 '10 at 11:47

You can't. Instead of spending that time on a software solution that can be broken, spend it on some hardware that does the same thing; only with less heartache.


You can use a NAC solution from Bradford or Cisco.

edit: I just went back and re-deciphered your question and it looks like you wan to write an application to do this. You can't. You need an inline device like the ones listed above (Cisco NAC can actually do out of band also, if you have all Cisco gear).