笑望人生,关于IHttpHandler处理图片
来源:互联网 发布:C语言roll程序 编辑:程序博客网 时间:2024/06/11 16:34
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
注意,不要勾选“检查文件是否存在”的选项。
2.打开你应用中的web.config,在system.web节中添加如下的话语:
<httpHandlers>
<add verb="*" path="*.jpg" type="IHTTPHandler实现的类, 该类所在的程序集" />
</httpHandlers>
3.编写那个IHttpHandler类:
在ProcessRequest里面根据需要使用context.Response.BinaryWrite将图片的二进制
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
1.打开IIS管理,注册ISAPI映射,比如".jpg"等都指向那个ASPNET_ISAPI.dll,在你的c:/windows/microsoft.net/framework/v1.0.3705下面;注意,不要勾选“检查文件是否存在”的选项。
2.打开你应用中的web.config,在system.web节中添加如下的话语:
<httpHandlers>
<add verb="*" path="*.jpg" type="IHTTPHandler实现的类, 该类所在的程序集" />
</httpHandlers>
3.编写那个IHttpHandler类:
在ProcessRequest里面根据需要使用context.Response.BinaryWrite将图片的二进制
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 笑望人生,关于IHttpHandler处理图片
- IHttpHandler处理防盗链和图片加水印
- 第二十一讲 IHttpHandler处理程序
- IHttpHandler
- IHttpHandler
- 关于图片LOGO处理
- 关于图片处理
- 关于图片的处理
- 图片地址防盗链,通过IHttpHandler实现
- 图片地址防盗链,通过IHttpHandler实现
- 防盗链IHttpHandler类[防盗链图片]
- 通过IhttpHandler实现图片验证码
- IHttpHandler写得一个图片验证码
- 通过IhttpHandler实现图片验证码
- 通过IhttpHandler实现图片验证码
- IHttpHandler的用法:给图片添加水印
- 继承IHttpHandler实现全局图片水印
- IHttpModule与IHttpHandler的区别和http请求处理过程,ihttpmodule,ihttphandler 处理流程
- 无限级别菜单的实现
- 客户端脚本对中文的验证(javascript)
- PHP实现的功能是显示8条基色色带
- 我的asp.net网站开发经验,欢迎参加讨论。
- 一个ORACLE分页程序,挺实用的.
- 笑望人生,关于IHttpHandler处理图片
- php,不用COM,生成excel文件
- HTML在线编辑器--服务器控件~~.NET实现~~
- 通过ICQ网关发送手机短信的PHP源程序
- How to Share Session State Between Classic ASP and
- 如何把PHP转成EXE文件
- 上次的一个问题我打了微软的求助电话,他们也没有办法!
- 关于选用何种ASP.NET设计方法的技巧
- web方式ftp