What's the difference between app_data folder in web application and in web site?

Go To StackoverFlow.com


I want to ask what the difference is between the app_data folder in a web application and in a web site .

I want to make sure that this folder is secure in web application because I put specific file in this folder which specific users only can download it.

2012-04-04 07:30
by Anyname Donotcare
How are you providing the provision to download the file? Is there any GridView and contains Hyperlinks? Second Question is - How are you differentiating downloading process for users - Pankaj 2012-04-11 10:44
just a hyperlink in a widget this widget appears only for specific users according to field in my db ..but i wanna to make sure that this folder is secure enough . when i published i had to copy and paste this folder to the server - Anyname Donotcare 2012-04-11 12:13


Preventive Action to check the user is valid before downloading

  1. Do not give the Directory Browsing Provision in IIS.

  2. There is basically a way in which the Anonymous/Unauthorized user can Access/download your Authorized File. Example - You know the Query String Values and other user can type and download it. So, there are two ways by which you can prevent unauthorized User to download file.

    (a) Keep the Web.Config in this folder and define the Roles/Users whoever can access it.

    (b) In the Page Load, you can check the page being opened is being done by the Authorized user only.

App_Data Folder is same for both types Web Application as well as Web Site.

2012-04-11 15:49
by Pankaj


The App_Data folder is used by ASP.NET to store an application's local database, such as the database for maintaining membership and role information. There is be no difference between the app_data folder using a Web App or a Web Site.




2012-04-04 07:33
by Darren


As Darren answered, there is no difference.

But to your other point of using it as a secure storage location, it is protected by ASP.NET, much like the bin folder, and users cannot browse to it.

2012-04-04 07:45
by Tuan