Re: ASPNET-IIS directories permissions

From: richlm (rich_lm_at_h0tmai1.com)
Date: 03/22/04


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
>



Relevant Pages

  • ASPNET-IIS directories permissions
    ... There is a directory tree with jpg files. ... I want to prohibit access to original images, however allow access to the thumbnails ... I might react to creation of new folder and call cacls.exe with some parameters, ... ASPNET itself, since when someone gets file by entering its exact url in browser ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • ASPNET-IIS directories security
    ... There is a directory tree with jpg files. ... I want to prohibit access to original images, however allow access to the thumbnails ... I might react to creation of new folder and call cacls.exe with some parameters, ... ASPNET itself, since when someone gets file by entering its exact url in browser ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Keeping photos in a certain order
    ... Sure you can move thumbnails around and play a slide show with the new ... order, but, when you close the folder and open it again you will see that ... If you need to batch rename and number, you can do this easily with XP. ... Copy the photos you want to place in a particular order into this new ...
    (microsoft.public.windowsxp.photos)
  • Re: can not defrag some big files
    ... I still have the prob with defrag. ... > Thumbs.db file contains the thumbnails for a particular folder. ... > [[Disables automatic storage of folder thumbnails in a cache file. ... > Google Desktop personal search index cannot be backed up while in use, ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: can not defrag some big files
    ... Thumbs.db file contains the thumbnails for a particular folder. ... Google Desktop personal search index cannot be backed up while in use, ... > following is a) the report from the defrag tool, ...
    (microsoft.public.windowsxp.perform_maintain)