使用HttpHandler防止图片盗链

一、摘要 对于你自己网站上的图片,你可能会希望它们只显示在自己网站的页面上,而当别人的网站引用它们时,不给予显示,或者显示一张自定义的警告图片,或者在图片上加上一个水印信息,告诉浏览者此图片是来自你的网站的。 使用ASP.NET的HttpHandler可以很方便地达到这样的效果。 二、实现步骤 1. 在网站项目中添加一个类文件,实现IHttpHandler接口 2. 配置Web.Conf... [More]

笔记:Windows 7 64 位系统下未能加载文件或程序集“System.Data.SQLite”的解决办法

一、问题 今天将自己的BlogEngine.NET博客下载到了Windows 7 64位系统里,这个博客使用SQLite数据库作为数据存储。结果在Windows 7 64位系统里运行这个博客的时候,出现如下错误: 未能加载文件或程序集”System.Data.SQLite”,或者格式错误等云云。 二、解决方案 上http://sourceforge.net/projects... [More]

BlogEngine.NET的图片护卫插件

摘要 图片护卫插件使你能够用三种不同的方式来保护你博文中的图片,这是首款(至少目前是)拥有如此功能的BlogEngine.NET插件。这三种不同的保护方式分别是: 水印方式(Watermark): 当你的图片被别的站点盗链时,在图片上加上水印,比如加个你的域名,起码告诉了浏览者,这是属于你的图片(顺便还宣传了你自己的网站,不是吗?: ) )。这是默认的护卫方式; ... [More]

Image Guard Extension for BlogEngine.NET

Image Guard is the first (if not unique, at least for the moment) BlogEngine.NET extension that allows you guard your image files in blog posts in three different ways when they are displayed on other sites.

Watermark: Add watermark to your images. (That’s a good way to spread your web site, isn’t it ? : ) );

Block: Replace the image that other sites request with a block image, such as an image only shows Not Allowed text on it;

Reject: Responde the request with 403 code. [More]

给图片添加水印的C#类库

本文提供了一个给图片添加水印的C#类库,首先介绍了它的使用方法,其次介绍了该类库的结构,最后公开了它的源代码以及整个项目文件。 [More]