<%@ page - How to block a website programatically using DotNet
Why are you using an application running on the local machine to do this? It doesn't make much sense. This is done through a corporate proxy, generally.
You may edit the
File to resolve a domain name to '127.0.0.1', instead of what it would normally do, to stop it being visible in that fashion. But it's better to do it properly.
Please describe what you're trying to do in more detail.
I am developing a windows application to block the websites from a computer using DotNet windows programming.I found some results to block an url but not for a website. That is I have to block complete website not a single url.
So can some one help me to solve this problem
- Create simple http proxy solutions with exclusion list (or look for ready to use solution)
- Restrict internet access to access only using Your proxy
You're going about it the wrong way. You don't want to intercept at the browser level - I'll use a browser or method you've never heard of to get where I want to go. You need to go deeper. Own the network interface or the operating system's network communication (e.g. the hosts file as people said) and authenticate each connection. Ideally, own it outside of the computer - at the network infrastructure level.
Detect browser URL
you can not access to internet browsers from winform projects but you can access if you have a plug-in app. for browsers. Develop a plug-in app. and communicate with your winform app. like internet download manager app. here is expamle for IE add-ons IE add-on express for chrome Google dev guide
hopefully helps it.