How to prevent file access in certain directories

  • Thread starter Thread starter Steve Franks
  • Start date Start date
S

Steve Franks

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
 
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/
======================================
 
Back
Top