If you map your image file extension(s) to be handled by aspnet_isapi.dll in
the IIS properties for your application, you could then map them to the
StaticFileHandler in your web.config, which will cause ASP.NET to apply your
authorization settings to the files while allowing them to display as-is if
authorization passes. For details on the technique, see
http://aspnet.4guysfromrolla.com/articles/020404-1.aspx (although you'll
want to use the StaticFileHandler rather than the HttpForbiddenHandler).
> I'm working on a ASP.NET app and as part of the app I'm uploading some
> pictures to the web server and these pictures can then be accessed by
[quoted text clipped - 8 lines]
>
> Thank you
Vi - 07 Jan 2006 15:55 GMT
Thank you for your reply.
In this particular app I'm not using ASP.NET authorization, but rather a
custom developed one. Therefore I suppose I will have to create my own
handler and map to it my image file extesions, rather then using
StaticFileHandler. Is that correct?
Merci.
> If you map your image file extension(s) to be handled by aspnet_isapi.dll in
> the IIS properties for your application, you could then map them to the
[quoted text clipped - 16 lines]
> >
> > Thank you
Nicole Calinoiu - 09 Jan 2006 13:09 GMT
Yup. Another approach would be to move these files out of your web folder
hierarchy and deliver their content only via a page or handler that
pre-screens the user identity. However, this would probably represent about
the same amount of development work for you while potentially increasing the
administrative burden, so creating a custom handler similar to
StaticFileHandler would probably be the simpler choice overall...
> Thank you for your reply.
> In this particular app I'm not using ASP.NET authorization, but rather a
[quoted text clipped - 29 lines]
>> >
>> > Thank you