473,796 Members | 2,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to prevent file access in certain directories

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
Nov 19 '05 #1
1 1659
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.d ll 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_localresour ces directory.

You can place global resource files, which cannot be requested directly
via http requests to your server, in the /app_globalresou rces 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" <pl****@postrep lyhere.com> wrote in message
news:Wq******** ************@co mcast.com... 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


Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1848
by: Kenneth McDonald | last post by:
I'd like to propose a new PEP , for a standard library module that deals with files and file paths in an object oriented manner. I believe this module should be included as part of the standard Python distribution. Background ========== Some time ago, I wrote such a module for myself, and have found it extremely useful. Recently, I found a reference to a similar module, http://www.jorendorff.com/articles/python/path/ by Jeff Orendorff.
0
1066
by: Marcel Hug | last post by:
Hello NG ! In my project i have a treeview, which shows a part of the directories in the file system. I would like to offer the rename from my treeview, but i have a little problem: If a file in a subdirectory is selected in the windows explorer, i could not rename because the access is denied. How could I test, if a rename is possible without an error ? I do allready check the subtree for open files, but that is not the result of the...
16
6272
by: MLH | last post by:
If I give someone a runtime app, they can open the database window by pressing the F-11 key. How to prevent???
3
8096
by: Okonita | last post by:
Hi all, I am having problem completing this restore operation. "db2 restore database AAMI01 from /pap/data/backups taken at 20071002130554 to /pap/data/db01 into AAMI01 NEWLOGPATH /pap/data/new/ log WITH 2 BUFFERS BUFFER 1024" SQL1326N The file or directory "/pap/data/db01/" cannot be accessed. The file, directory and path all exist. I created them. I just can't
12
8546
by: Hongyu | last post by:
Dear all: I am trying to write to a file with full directory name and file name specified (./outdir/mytestout.txt where . is the current directory) in C programming language and under Unix, but got errors of Failed to open file ./outdir/mytestout.txt. Below is the code: #include <stdio.h> int main(void)
65
5107
by: Hongyu | last post by:
Dear all: I am trying to write to a file with full directory name and file name specified (./outdir/mytestout.txt where . is the current directory) in C programming language and under Unix, but got errors of Failed to open file ./outdir/mytestout.txt. Below is the code: #include <stdio.h>
1
2227
by: Juerg Beck | last post by:
Hello all I'm completely new to php but a complete newbie when it comes to unix. So please don't laugh about my problem. I have programmed a nice password check with php, javascript and a database and it works. But as I have removed the access control with ..htaccess on the server I recognized that everybody can now directly download all documents without a password, as long as they know the filename and location.
3
2811
by: peter | last post by:
Hi all In apache, How can i prevent php to be execute in a specific directory? thanks from Peter (cmk128@hotmail.com)
6
1281
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, I'm trying to download a binary ZIP file using HTTP. Following an example in MSDN and other sources, my code is: WebClient client = new WebClient(); client.DownloadFile"http://www.website.com/BinaryFile.zip", "BinaryFile.zip"); Using FTP I can download the file fine, but HTTP downloads something else, which is not what is in my file. Instead its content is something like the
0
9680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10455
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10228
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10173
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6788
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.