hello !
i want to restrict user to not visit www.abc.com site , from my pc , how can i do it in c# , user will use chrome , firfox , IE etc ,

Regards

Recommended Answers

All 4 Replies

I haven't done anything like this myself but I think you will need a service running in the background that checks the current open TCP connections against your blacklist and shuts them down if they feature on it. Of course TCP connections appear as IP addresses so your blacklist will either need to consist of IP addresses or you will need to match a domain name to an IP.

thanks hericles . i have to come to know that i can just block any website byu just entering its name in C:\windows\system32\drivers\etc\hosts . but prob is that i want to open this file as administrator so that i can make changes init ,is there any way to open any text file with administrator right and show its all data in my textbox. using vb.net or c# ?

Regards

normal code would do it. just run your exe as an administrator after building. The exe can access the text file.

thread is solved now .thanks both of you.

Regards

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.