The Wayback Machine - https://web.archive.org/web/20111027181628/http://aspnet4.com:80/asp-net-tutorial/asp-net-directory-structure/
ASP.NET Tutorial


Oct 25, 2011
ASP.net Guru

ASP.NET Directory Structure

When using ASP.NET to create web application, you have an ASP.NET directory structre which can be determined byyou the developer’s choices. There are a few reserved directory names which cannot be used but a site can have as much as directories as required.

The ASP.NET Directory structure is typically reflected directly in the URL, and even though ASP.NET provides a way to intercept the request at a point during web page processing, it is not forced to funnel requests through a central application or front controller.

The following are some of the Special ASP.NET Directory names available in ASP.NET:

App_Code

Is the directory used for any code used in the ASP.NET web application. The ASP.NET server will automatically compile these files and any subdirectorues within the App_Code folder into an assembly which can be then accessed by the code in any page of the ASP.NET website.

The App_Code will be used for:

  • Data access abstraction code
  • Model code
  • Business code
  • Any site specific http handlers and modules
  • Any Web service implementations

Note:

  • An alternative to using App_Code the developer may opt to provide a separate assembly with pre-compiled code.

App_Data

The App_Data ASP.NET Directory is the default directory for any database used by the ASP.NET Website. These databases might include Access (mdb) files or SQL Server (mdf) files. The App_Data is the only directory with Write Access enabled for the ASP.NET web application.

App_LocalResources

The ASP.NET App_LocalResources Directory holds any localized resources used by the ASP.NET web application. These may includes different version of the same page for instance a page with the same content but in two different languages.

App_GlobalResources

The ASP.NET App_GlobalResources Directory is used to hold any “resx” files with localized resources which can be used at any ASP.NET web page in the web site. The ASP.NET App_Global Resources folder is where the ASP.NET developer uses to store any localized messages which might be used on more than one ASP.NET web page.

App_Themes

The ASP.NET App_Themes Directory is used to contain any files related to ASP.NET themes which is a new ASP.NET feature from ASP.NET 2.0.  ASP.NET themes can be used to make a consistent appearance through out the whole ASP.NET Website and makes it easier to change the appearance of the website.

App_WebReferences

The ASP.NET App_WebReferences is used to contain any discovery files and WSDL files for references to Web services to be used in the ASP.NET website.

Bin

The ASP.NET Bin Directory is used to hold any compiled code (.dll files). These compiled code can be used as  reference in your application for

  • Controls
  • Components
  • Other codes of you application

Any classes represented by code in the Bin folder are automatically referenced in your application.

Related Tutorials: