Monday, April 7, 2008

ASP .NET Folders

 
\App_Code
The App_Code folder is meant to store classes, .wsdl files, and typed datasets. Any of these items stored in this folder then is automatically available to all the pages in the solution.

\App_Themes
Themes are used to define visual styles for web pages. Themes are made up of a set of elements: skins, Cascading Style Sheets (CSS), images, and other resources. Themes can be applied at the application, page, or server control level.

\App_Data
It contains application data stored in the form of files including MDF files, XML files, text file as well as other data store files. The user account utilized by the application will have read and write access to any of the files contained within the App_Data Folder. By default, this is the ASPNET account. The default ASPNET account is granted full permissions on the folder. If we change the ASPNET account, we have to make sure that the new account is granted read/write permissions on the folder.

\App_GlobalResources
Typical resources are images, icon, text and auxiliary files. Application resources are stored outside of the application so that they can be recompiled and replaced without affecting and recompiling the application itself. It is like the App_LocalResources folders, but contains .resx files that are not bound to a specific page. Resource values in .resx files in the App_GlobalResource folders can be accessed programmatically from application code. You can add Assembly Resource Files (.resx) to this folder and they are dynamically compiled and made part of the solution for use by all your aspx pages in the application. Let us assume that we have created two resource files in this folder, Resource.resx and Resource.it.resx. The first file, Resource.resx, is the default language file using American English. The second file is for same text but for Italian language. If anyone invokes any page after setting browser culture Italian, then the information will come from Resource.it.resx file and for others the information will come from default Resource.resx file.

\App_LocalResources
We can add resource files that are page-specific to the \App_LocalResources folder. We can define multiple .resx files for each page, each .resx file representing a different language or language/culture combination.

\App_WebReferences
you can use the \App_WebReferences folder and have automatic access to the remote Web services referenced from your application.

\App_Browsers
The App_Browsers folder holds browser files, which are XML files used to describe characteristics and capabilities of these browsers. We can find a list of globally accessible browser files in the CONFIG\Browsers folder under the installation path. In addition, if you want to change any part of these default browser definition files, just copy the appropriate browser file from the Browsers folder to your application’s \App_Browsers folder and change the definition.

\Bin
It contains compiled assemblies (.DLL files) for controls, components, or other code that we want to reference in our application. Any DLL files found in the directory will be automatically linked in the application. This is also recognized by ASP.NET 1.x applications. This folder is mandatory.