Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
Hi friends,
My application required to block browser from accessing the net.I need to write code in c#.net. How to do that? If any one knows kindly help me. If anybody knows it in the context of proxy server concept i will be delighted.
Posted
Updated 31-Mar-11 1:28am
v2
Comments
Michel [mjbohn] 31-Mar-11 7:11am    
Hijust for my understanding. Why is such an app needed? This is issue should be solved by router ACLs or even better a firewall.
Sergey Alexandrovich Kryukov 31-Mar-11 15:41pm    
I would ask the same. To me it looks like looking in wring direction.
--SA

1 solution

The only thing I can think of is to have your app open port 80 and keep it open. Of course, your app has to be open BEFORE the browser in order for that to work. Your best bet is to simply turn on the Windows firewall and block outbound traffic on the ports typically used by internet capable apps. I'm not sure (because I don't use it), but the Windows firewall may also be able to block specified apps.
 
Share this answer
 
Comments
Michel [mjbohn] 31-Mar-11 7:41am    
Opening port 80 would not work at all. Port 80 is at destination point not at source. But as you said, a firewall would do the job. and only a firewall

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900