Click here to Skip to main content
15,904,416 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi All,
I want to block a particular site using code, I don't have any idea how to do this. Please help me.
Posted
Updated 3-Apr-11 20:20pm
v2
Comments
Eduard Keilholz 4-Apr-11 2:23am    
What do you mean with 'block', and 'what' do you want to block, using a webservice, visiting your website? Ask a proper question!
j.patrickjerome 4-Apr-11 2:35am    
Thank you for replay,
I want to block particular site,for ex WWW.yahoo.com
DaveAuld 4-Apr-11 2:48am    
Yes, but where do you want to block it? What are you trying to prevent the user from doing?
j.patrickjerome 4-Apr-11 2:55am    
yes,want to block from C:\Windows\System32\drivers\etc\hosts.... if user trying to enter that particular site,mess box ll show "site is blocked" lik that...
j.patrickjerome 4-Apr-11 3:28am    
thank you for your help,but still i didn't block! is there any procedure before block the website

Tagged ASP.NET?

For a windows application, my first step would be to check various ways to block a website on a machine / all browsers. I would then try and implement those with the code.

I suggest you to start by searching on Google. You will surely get some hint. :thumbsup:
 
Share this answer
 
Based on your subsequent reply to my comment, see the following;
http://www.dkszone.net/block-websites-editing-hosts-file-windows-7vistaxp[^]
 
Share this answer
 

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