user351000
user351000

Reputation:

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. How this can be done? Do I have to set something in IIS?

Upvotes: 1

Views: 339

Answers (1)

Mike Atlas
Mike Atlas

Reputation: 8231

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.

Many tutorials on how to do this are available.

Upvotes: 1

Related Questions