Re: Folders and security

From: Craig Deelsnyder (c_deelsny@yahoo.com)
Date: 02/05/03


From: "Craig Deelsnyder" <c_deelsny@yahoo.com (remove underscore)>
Date: Wed, 5 Feb 2003 12:48:38 -0600


Forms authentication only applies to the ASP.NET process, so any other files
not going to that process are not protected (images do not by default get
forwarded to it, for example). But you can map other file extensions in IIS
to the ASP.NET process.

There's been a few posts in this group of how to do it. It's in the
Configuration of your web app in IIS. There's a section that maps
extensions (such as .aspx) to processes. Copy the setting for .aspx to any
other filetypes you need to protect.

Note that some have said this can cause problems with certain types of files
when viewed in a browser. But for the most part, this seems to work fine.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
"Mads Jacobsen" <mads.jacobsen@pol.dk> wrote in message
news:O7OkRAUzCHA.1900@TK2MSFTNGP10...
> Hi,
>
> I'm building a site and I have an area with Forms-authentication, let's
call
> it <root>/secdir.
>
> Inside secdir I have a folder with pictures, let's call it
> <root>/secdir/pictures.
>
> Now, what I want is to control access to the picturedirectory. It shall
not
> be possible to typean URL in the browser and then go directly to the
picture
> folder:
>
> http://www.mysite.com/secdir/pictures/pic.jpg
>
> - without logging in or getting the authentication in some other way. But
if
> I open a new browser and type the URL above, I'm just getting the picture.
I
> need to be redirected to the login-page. I'm being redirected to the
> login-page correctly if I just type the URL that comes after login (hope
> this makes sense...)!
>
> Hope to get help.
>
> Regards,
> Mads
>
>


Relevant Pages

  • Re: Page layout for tubie pages on the net Re: Deep Space 845 55WSET amps.
    ... picture on the right ... Just to add a bit of explanation, the viewing browser might have ... browser will then word wrap to the viewer's window. ... in one cell and the text in another. ...
    (rec.audio.tubes)
  • Re: Capturing a browser image
    ... Rather than putting in Exit Function within the loop though, simply kill the loop and it will ... >the .Refreshmethod of the control should perform the same task without stomping on the control's picture. ... That's why I suggested the OP place the browser within another control ... browser hosted within a usercontrol and sending the usercontrol a ...
    (microsoft.public.vb.winapi.graphics)
  • Pictures into stories via IE7
    ... visually search through their documents by turning the icon of the file into ... a geometric picture dependent on its contents. ... image file itself which would have meta-data fields for the story to go in. ... Obviously the whole idea is that the browser ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Photo: New Japanese Flatop
    ... so many Asian countries don't know squat about web design (the plague ... Depends on your browser I suspect. ... picture, neither on the main page of that site. ...
    (sci.military.naval)
  • Re: Insert pictures in a protected form?
    ... setup -- you can't protect just part of a section. ... Jay Freedman ... There is no such thing as a "picture form field"? ... >>>Is there a basic work around for this? ...
    (microsoft.public.word.docmanagement)