How to prevent file access in certain directories

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
 
J

Juan T. Llibre

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_
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top