Re: ASPNET-IIS directories permissions
From: richlm (rich_lm_at_h0tmai1.com)
Date: 03/22/04
- Next message: Hernan de Lahitte: "Re: Mixing FormsAuthentication and Custom Principals"
- Previous message: Wes Henderson: "Re: How can I get current role name???"
- In reply to: Michał Januszczyk: "ASPNET-IIS directories permissions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 22 Mar 2004 21:27:08 +0100
Take a look at "HTTP runtime support" in ASP.NET - HttpModule (or maybe
HttpHandler if it's only .jpg extension) can provide a really elegant
solution.
This provides features a bit like ISAPI filters, but confined to within
ASP.NET.
You 'intercept' requests, and can pre-process (and if appropriate refuse
them). The processing might for example implement the logic you described
below, dynamically examining folders & the incoming request. All this
happens before the request even hits application files in your ASP.NET
application folder.
You will need to map .jpg (or .*) to be handled by ASP.NET ISAPI dll in IIS.
Hope this helps
Richard.
"Michal Januszczyk" <anonymous@discussions.microsoft.com> wrote in message
news:1FFB95C9-B41F-4F74-9B25-71F86B9B3F31@microsoft.com...
> Is it possible to implement the following functionality ?
>
>
> There is a directory tree with jpg files. All the directories are nested
under
> some root directory named RootDir. Each directory in the tree has
subdirectory
> with thumbnails of the directory images. Thumbnail dir does never have
subdir.
>
> I want to prohibit access to original images, however allow access to the
thumbnails
> for IUSR_MACHINENAME user.
>
> The problem would be simple if the directory structure had been static. I
would
> define appropriate ACLs for each folder. However, the directory structure
changes
> and I search some mechanism that would allow me to impose constraints on
the
> dynamically created folders.
>
> I might react to creation of new folder and call cacls.exe with some
parameters,
> however I'm looking for some more ellegant solution.
> All the thumbnail folders are the same name (THUMBS) . And they contain
> files that are always named <originalfilename.jpg>_THUMB.jpg
> (e.g. garden.jpg_THUMB.jpg). I think that this problem relates more to IIS
than
> ASPNET itself, since when someone gets file by entering its exact url in
browser
> (e.g http://mysite/myapp/RootDir/FolderA/FolderB/garden.jpg), he (or the b
rowser)
> talks with IIS, not ASPNET.
> So am I forced to write some filter/plugin for IIS ?
> Or maybe there is a way to achieve this somehow with ASPNET alone?
>
>
> Thanks
> Michal Januszczyk
>
- Next message: Hernan de Lahitte: "Re: Mixing FormsAuthentication and Custom Principals"
- Previous message: Wes Henderson: "Re: How can I get current role name???"
- In reply to: Michał Januszczyk: "ASPNET-IIS directories permissions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|