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. How this can be done? Do I have to set something in IIS?
Write an HttpModule that checks the request path. If the path contains fileserver/{user_id}
, and user_id
is a valid user, then check to see if user_id
is authenticated.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.