[英]IIS Virtual Folders Permissions per User Account
I have a website with the below structure for saving product images: 我有一个具有以下结构的网站,用于保存产品图片:
~/fileserver/{user_id}/{file_id}.{file_extension}
I want to restrict access to each {user_id}
folder and let only the specific user to retrieve that image. 我想限制对每个
{user_id}
文件夹的访问,只允许特定用户检索该图像。 How this can be done? 如何做到这一点? Do I have to set something in IIS?
我必须在IIS中进行设置吗?
Write an HttpModule that checks the request path. 编写一个检查请求路径的HttpModule 。 If the path contains
fileserver/{user_id}
, and user_id
is a valid user, then check to see if user_id
is authenticated. 如果路径包含
fileserver/{user_id}
,并且user_id
是有效用户,则检查user_id
是否已通过身份验证。
Many tutorials on how to do this are available . 提供了许多有关如何执行此操作的教程 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.