Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > iis security > september 2005 >

iis security : Protecting Image Files


RMurray
9/14/2005 12:08:11 PM
We are currently serving images of financial documents to users on our
website hosted on Windows 2000. The problem we are having is that anyone can
go straight to the image in the directory. What we're hoping to do is have
IIS use the user context of the site that is requesting the image to
authenticate the request rather than having IIS provide a user. Is there
any way to do this without authenticating each user with Windows
Authentication?

Any advice would be greatly appreciated.

Thanks,
RMurray
9/14/2005 2:43:07 PM
Thanks! My boss had been playing with this but we weren't sure if it was even
possible. Would you by chance be able to point me toward some sample code?

Ryan


[quoted text, click to view]
Tom Kaminski [MVP]
9/14/2005 4:42:21 PM
[quoted text, click to view]

Place the files outside of the wwwroot path to prevent direct URL access and
use an ASP or ASPX to read the file and Response.BinaryWrite the contents
after the user has passed your authentication scheme.

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS

Tom Kaminski [MVP]
9/15/2005 10:55:50 AM
[quoted text, click to view]

http://support.microsoft.com/kb/q276488/

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS

AddThis Social Bookmark Button