如何在桌面应用程序的Visual Studio 2010中使用C#语言阻止网站 [英] how can i block a website using c# language in visual studio 2010 in Desktop Application

查看:82
本文介绍了如何在桌面应用程序的Visual Studio 2010中使用C#语言阻止网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好...

我想用C#制作一个软件(桌面应用程序),通过它我可以阻止网站.
我如何使用C#阻止那些特定的URL?表示网址将被阻止
在Mozila firefox和Google Chrome或其他流行的浏览器中?

谢谢

解决方案

最简单的方法是更新主机文件.您可以编写一个应用程序来包装该过程,但效果不那么理想,因为具有管理员权限的用户可以进入并更改文件以打开那些站点.


Hi Everyone ...

i want to make a software( Desktop application ) in C# by which i can block websites .
how i can block those specific urls using C# ? means urls will be blocked
in Mozila firefox and Google Chrome or other popular browsers?

Thank You

解决方案

The simplest way would be to update the hosts file. You could just write an application to wrap that process, but it won''t be that effective because the user with admin privilege can just go in and alter the file to open up those sites.


这篇关于如何在桌面应用程序的Visual Studio 2010中使用C#语言阻止网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆