Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to prevent file access in certain directories

Reply
Thread Tools

How to prevent file access in certain directories

 
 
Steve Franks
Guest
Posts: n/a
 
      11-01-2005
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


 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      11-01-2005
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/be...aming_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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding one certain line in a file is easy but how to look forheadlines and something just under this certain headline? kazaam Ruby 3 08-26-2007 03:34 PM
For certain directories, protecting files from direct access that match a naming pattern OR mediating http access through my app Ken Fine ASP .Net 1 07-31-2007 06:49 AM
How to prevent access by others to one or several directories on my hard drive burp@easy.com Computer Support 5 07-24-2004 02:04 PM
How to map Project directories to Production sub-directories Joel Finkel ASP .Net 0 09-12-2003 06:47 PM
Using virtual directories for common directories (scripts, images, styles, etc.) Jeffry van de Vuurst ASP .Net 2 07-30-2003 07:00 PM



Advertisments