Prevent uploaded documents folder from search engine or unauthenticated access:

Discussion in 'ASP .Net' started by bradley, Jun 8, 2005.

  1. bradley

    bradley Guest

    I have an \upload folder beneath the web root where I have MS Word and other
    documents that I would prefer not be available to the public. How can I
    configure web.config to prevent these files from turning up in a search
    engine list and prevent an unauthenticated user from typing in the url. This
    is a hosted site, and I can use forms or windows authentication.
    bradley, Jun 8, 2005
    #1
    1. Advertising

  2. You normally don't because those files those files are not processed by the
    isapi_filter so the .NET authentication mechanism will not work.

    One thing that I would suggest is to have the files exist outside of your
    virtual root, that way nothing can directly access them. Instead, you
    create a page like view.aspx?filename=... which can then access the file and
    stream the content to the browser. You can then protect view.asp using .NET
    authentication.

    "bradley" <> wrote in message
    news:...
    > I have an \upload folder beneath the web root where I have MS Word and

    other
    > documents that I would prefer not be available to the public. How can I
    > configure web.config to prevent these files from turning up in a search
    > engine list and prevent an unauthenticated user from typing in the url.

    This
    > is a hosted site, and I can use forms or windows authentication.
    >
    >
    >
    Peter Rilling, Jun 8, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt G
    Replies:
    1
    Views:
    1,144
    Deepak Kumar Vasudevan
    Aug 22, 2003
  2. =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=

    redirect unauthenticated users from frameset child pages?

    =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=, Nov 2, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,006
    =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=
    Nov 2, 2005
  3. Keithb
    Replies:
    0
    Views:
    438
    Keithb
    Oct 28, 2006
  4. Sasha
    Replies:
    3
    Views:
    579
    Sasha
    May 22, 2007
  5. Penguini
    Replies:
    2
    Views:
    682
    Penguini
    Dec 3, 2007
Loading...

Share This Page