ASP.NET application folders

ASP.NET 3.5 uses file based approach and we’re allowed to create as many folders and files in our application without recompiling each and every time a new file is added to the solution. Visual studio IDE has the capability to automatically precompile asp.net applications dynamically.

ASP.NET 3.5 has already defined folder structure that let’s you configure individual settings related to your application like themes, code, resources. These are some of the predefined asp.net application folders:
  • \App_Code
  • \App_Data
  • \ App_Themes
  • \App_GlobalResources
  • \ App_LocalResources
  • \ App_WebReferences
  • \App_Browsers
\App_Browsers

This folder maintains browser definition files. These files let’s you configure your web application as per the browser capabilities. These files have extension .browser and are xml files used to identify the browsers making requests to the application. If you want to modify any default browser definition file then access the default files from “drive://windows/Microsoft.NET/Framework/CONFIG/Browsers” and then just copy the respective .browser file to app_browsers folder and change the definition.
  
\App_WebReferences
The \App_WebReference folder has automatic access to the remote web services referenced from your web application.  

\App_LocalResources If you want to add resource files that are page specific then you need to add the files in \App_LocalResources folder. To do this you need to construct the name of the .resx file in the following manner: Default.aspx.resx Default.aspx.en-gb.resx Once you do this you’ll be able to use the resource declarations from the appropriate file in the \App_Localresource folder.

\App_GlobalResources If you want to make changes to your entire web-application then this folder let’s you make changes which are easily applied to entire application. To do this you need to add assembly resource files (.resx) to the \App_Global Resources folder and this way they’re dynamically compiled and are available to your entire app.  

\App_Themes If you wish to provide common look and feel to your entire web application in that case themes folder will help you manage this. You can create themes using .skin file, css file and images. By storing these elements in your themes folder you can easily apply the themes.

 \App_Data The app_data folder holds the data stores utilized by the web application. This folder usually contains .mdf files, .mdb files and xml files and lot more. By default user account will have read only access to these files.

\App_Code This folder stores classes, .wsdl files and typed datasets. Any elements like this stored in this folder becomes available for entire web app solution. Visual studio IDE automatically compiles the files in this folder if there is .cs or .vb file and automatically creates your XML web service proxy class or .xsd for typed dataset. Like ASP.NET 1.0/1.1 your solution will not create .dll for these settings but now you’ve to maintain folder structure to manage your web app solution.