views:

19

answers:

1

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?

A: 

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.

Mike Atlas