Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Password protect .jpg or .pdf

Reply
Thread Tools

Password protect .jpg or .pdf

 
 
cjburkha
Guest
Posts: n/a
 
      07-24-2006
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

 
Reply With Quote
 
 
 
 
Joe Kaplan \(MVP - ADSI\)
Guest
Posts: n/a
 
      07-24-2006
StaticFileHandler, in conjunction with the right metabase mappings in IIS,
is what you want.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"cjburkha" <> wrote in message
news: ups.com...
> 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
>



 
Reply With Quote
 
 
 
 
cjburkha
Guest
Posts: n/a
 
      07-25-2006
Great, thank you for that tip.
Joe Kaplan (MVP - ADSI) wrote:
> StaticFileHandler, in conjunction with the right metabase mappings in IIS,
> is what you want.
>
> Joe K.
>
> --
> Joe Kaplan-MS MVP Directory Services Programming
> Co-author of "The .NET Developer's Guide to Directory Services Programming"
> http://www.directoryprogramming.net
> --
> "cjburkha" <> wrote in message
> news: ups.com...
> > 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
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change a users password without knowing the old password nor the answer to the password question AAaron123 ASP .Net 1 01-16-2009 02:56 PM
Changing a users password without knowing the old password nor the answer to the password question AAaron123 ASP .Net 2 01-16-2009 02:08 PM
how to password protect site? Tim Zych ASP .Net 4 12-30-2003 12:56 AM
how to password protect site Tim Zych ASP .Net 1 12-24-2003 03:55 PM
simplest way to password protect website with SQL Server Brent Burkart ASP .Net 5 10-16-2003 05:34 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57