本文介绍了如何限制图像文件夹的直接访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我有一个图片网站,会员可以在其中上传文件,并限制几个朋友的访问.问题是,可以直接从浏览器访问图像.
请注意,
Neeraj
Hi All,
I''ve a image gallery website where members can upload and restrict the access to few friends. The problem is, images are directly accessible from browser. How could I restrict specific folder to accessible from aspx pages only.
Regards,
Neeraj
推荐答案
Neeraj Arora写道:
Neeraj Arora wrote:
如何限制特定文件夹只能从aspx页面访问
How could I restrict specific folder to accessible from aspx pages only
编写一个处理图像请求的http处理程序.检查身份验证并显示必要的消息.确保在IIS设置中将扩展映射到ASP.NET.
Write a http handler which handles requests for images. Check the authentication and display necessary messages. Make sure you map the extensions to ASP.NET in IIS settings.
这篇关于如何限制图像文件夹的直接访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!