How to prevent file access in certain directories

Discussion in 'ASP .Net' started by Steve Franks, Nov 1, 2005.

  1. Steve Franks

    Steve Franks Guest

    I'd like to set up a certain part of my web tree so that no browsers can
    access files from that directory and any directories below it. I will store
    certain resouces like xml files and other resource files in there. These
    are files that my web components need access to but that the browser should
    not be able to request diretly.

    I know under VS.NET 2005 there is an app_data directory but I didn't have
    any luck using it.

    What's the right way to do what I'm after?

    Thanks

    Steve
    Steve Franks, Nov 1, 2005
    #1
    1. Advertising

  2. re:
    > I know under VS.NET 2005 there is an app_data directory but I didn't have any luck using
    > it.


    The content in all the special directories other than app_themes
    is not accessible via http requests to the server.

    The request blocking is made by the aspnet_filter.dll ISAPI
    filter installed with ASP.NET 2.0 since Beta 2.

    You can place xml data files, which cannot be requested directly
    via http requests to your server, in the app_data directory.

    You can place local resource files, which cannot be requested directly
    via http requests to your server, in the /app_localresources directory.

    You can place global resource files, which cannot be requested directly
    via http requests to your server, in the /app_globalresources directory.

    See :

    http://msdn.microsoft.com/asp.net/beta2/beta2update.aspx#ASP.NET_2.0_Directory_Naming_Changes_




    Juan T. Llibre, ASP.NET MVP
    ASP.NET FAQ : http://asp.net.do/faq/
    Foros de ASP.NET en EspaƱol : http://asp.net.do/foros/
    ======================================

    "Steve Franks" <> wrote in message
    news:...
    > I'd like to set up a certain part of my web tree so that no browsers can access files
    > from that directory and any directories below it. I will store certain resouces like
    > xml files and other resource files in there. These are files that my web components
    > need access to but that the browser should not be able to request diretly.
    >
    > I know under VS.NET 2005 there is an app_data directory but I didn't have any luck using
    > it.
    >
    > What's the right way to do what I'm after?
    >
    > Thanks
    >
    > Steve
    Juan T. Llibre, Nov 1, 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. Replies:
    0
    Views:
    637
  2. Ken Fine
    Replies:
    1
    Views:
    678
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Jul 31, 2007
  3. Replies:
    2
    Views:
    505
    bruce barker
    Mar 25, 2008
  4. Peng Yu
    Replies:
    0
    Views:
    263
    Peng Yu
    Oct 30, 2009
  5. SAN CAZIANO
    Replies:
    8
    Views:
    164
    Dr John Stockton
    Oct 15, 2004
Loading...

Share This Page