Microsoft.NET

……………………………………………….Expertise in .NET Technologies

ASP.NET Web Project File Types

Posted by Ravi Varma Thumati on January 3, 2011

Web site applications can contain different file types. By default, some are supported and managed by ASP.NET, and others are supported and managed by the IIS server. Optionally, you can specify that all types should be handled by ASP.NET.

Most of the ASP.NET file types can be automatically generated using the Add New Item menu item in Visual Studio.

File types are associated with applications by using mappings. For example, if you double-click a .txt file in Windows Explorer, typically Notepad opens, because in Windows, .txt file types are associated by default to Notepad.exe. In Web applications, file types are mapped to application extensions in IIS.

File Types Managed by ASP.NET


File types that are managed by ASP.NET are mapped to the Aspnet_isapi.dll in IIS.

File type Location Description
.asax Application root. Typically a Global.asax file that represents the application class and contains optional methods (event handlers) that run at various points in the application life cycle.
.ascx Application root or a subdirectory. A Web user control file that defines a custom functionality that you can add to any ASP.NET Web Forms page.
.ashx Application root or a subdirectory. A handler file that is invoked in response to a Web request in order to generate dynamic content.
.asmx Application root or a subdirectory. An XML Web services file that contains classes and methods that can be invoked by other Web applications.
.aspx Application root or a subdirectory. An ASP.NET Web Forms page that can contain Web controls and presentation and business logic.
.axd Application root. A handler file that is used to manage Web site administration requests, such as Trace.axd.
.browser App_Browsers subdirectory. A browser definition file that identifies the features of an individual browser.
.cd Application root or a subdirectory. A class diagram file.
.compile Bin subdirectory. A precompiled stub files that point to an assembly that represents a compiled Web site file. When you precompile a Web site project, executable file types (.aspx, ascx, .master, and theme files) are compiled and put in the Bin subdirectory.
.config Application root or a subdirectory. A configuration file contains XML elements that represent settings for ASP.NET features.
.cs, .vb App_Code subdirectory, or in the case of a code-behind file for an ASP.NET page, in the same directory as the Web page. Source code files (.cs or .vb files) that define code that can be shared between pages, such as code for custom classes, business logic, HTTP modules, and HTTP handlers.
.csproj, .vbproj Visual Studio project directory. A project file for a Visual Studio Web-application project.
.disco, .vsdisco App_WebReferences subdirectory. An XML Web services discovery file that is used to help locate Web services.
.dsdgm, .dsprototype Application root or a subdirectory. A distributed service diagram (DSD) file that can be added to any Visual Studio solution that provides or consumes Web services to reverse-engineer an architectural view of the Web service interactions.
.dll Bin subdirectory. A compiled class library file (assembly). In a Web site project, instead of placing compiled assemblies in the Bin subdirectory, you can put source code for classes in the App_Code subdirectory.
.licx, .webinfo Application root or a subdirectory. A license file. Licensing allows control authors to help protect intellectual property by checking that a user is authorized to use the control.
.master Application root or subdirectory. A master page that defines the layout for other Web pages in the application.
.mdb, .ldb App_Data subdirectory. An Access database file.
.mdf App_Data subdirectory. A SQL Server Express database file.
.msgx, .svc Application root or a subdirectory. An Indigo Messaging Framework (MFx) service file.
.resources, .resx App_GlobalResources or App_LocalResources subdirectory. A resource file that contains resource strings that refer to images, localizable text, or other data.
.sdm, .sdmDocument Application root or a subdirectory. A system definition model (SDM) file.
.sitemap Application root. A sitemap file that defines the logical structure of the Web application. ASP.NET includes a default sitemap provider that uses sitemap files to display a navigational control in a Web page.
.skin App_Themes subdirectory. A skin file that contains property settings to apply to Web controls for consistent formatting.
.sln Visual Studio project directory. A solution file for a Visual Studio project..
.soap Application root or a subdirectory. A SOAP extension file.

File Types Managed by IIS


The following file types are typically managed by IIS.

File type Location Description
.asa Application root. Typically a Global.asa file that contains optional methods that run at the start or end of the ASP session or application lifetime.
imDitto Application root or a subdirectory. An ASP Web page that contains @ directives and script code that uses the ASP built-in objects.
.cdx App_Data subdirectory. A compound index file structure file for Visual FoxPro.
.cer Application root or a subdirectory. A certificate file used to authenticate a Web site.
.idc Application root or a subdirectory. An Internet Database Connector file mapped to httpodbc.dll. 

Note

IDC has been deprecated because it does not provide enough security for data connections. IIS 6.0 is the last version to include IDC.

.shtm, .shtml, .stm Application root or a subdirectory. Mapped to ssinc.dll.

Static File Types


IIS serves static files only if their file-name extensions are registered in the MIME types list. This list is stored in the MimeMap IIS metabase property for an application. If a file type is mapped to an application extension, it does not need to be included in the MIME types list unless you want the file to be treated like a static file. Typically, ASP.NET source code file types should not be in the MIME types list because that will allow browsers to view the page’s source code.

The following table lists only a few of the registered file types.

File type Location Description
.css Application root or subdirectory, or App_Themes subdirectory. Style sheet files used to determine the formatting of HTML elements.
.htm, .html Application root or subdirectory. Static Web files written in HTML code.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: