Password protect .jpg or .pdf

C

cjburkha

Hi,

I've been searching the web and google for a while now, and can't find
how to do exactly what I want to do. I'm sorry if this has been
answered before, I just cant find it.

My idea is to have a folder /root/public/secure which has a web.config
file in it like so
<authorization>
<deny users="?" />
</authorization>

Now in that folder, protected.aspx is protected, but protected.pdf is
not protected.

I use
<httpHandlers>
<add verb="*" path="*.mdb" type="System.Web.HttpForbiddenHandler"
/>
</httpHandlers>

to protect my .mdb. But this dis-allows downloading. I want to allow
authenticated downloading. Something like
System.Web.HttpAuthenticatedHandler. But I can not find that handler.

Any ideas? I hear of people using response.write, but I don't feel that
is what I want to do.

Thanks for any help/hints you can give
 
J

Joe Kaplan \(MVP - ADSI\)

StaticFileHandler, in conjunction with the right metabase mappings in IIS,
is what you want.

Joe K.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top