Compartir a través de


Web Site File Types

Web site applications can contain a number of file types, some supported and managed by ASP.NET, and others supported and managed by the IIS server.

Most of the ASP.NET file types can be automatically generated using the Add New Item menu item in Visual Web Developer. For more information, see How to: Add ASP.NET Web Pages to a Web Site (Visual Studio) and How to: Add ASP.NET Web Forms Page to a Web Project and How to: Add ASP.NET Web Pages to a Web Site and How to: Add ASP.NET Web Pages to a Web Site.

File types are mapped to applications using application mappings. For example, if you use double-click a .txt file in Windows Explorer, Notepad will probably open, because in Windows, .txt file types are mapped by default to Notepad.exe. In Web applications, file types are mapped to application extensions in IIS. For more information, see Setting Application Mappings in IIS Help.

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 contains code that derives from the HttpApplication class. This file represents the application and contains optional methods that run at the start or end of the application lifetime.

For more information, see Global.asax Syntax.

.ascx

Application root or a subdirectory.

A Web user control file that defines a custom, reusable control.

For more information, see ASP.NET User Controls.

.ashx

Application root or a subdirectory.

A generic handler file that contains code that implements the IHttpHandler interface.

For more information, see HTTP Handlers.

.asmx

Application root or a subdirectory.

An XML Web services file that contains classes and methods that are available to other Web applications by way of SOAP.

For more information, see XML Web Services Publishing and Deployment.

.aspx

Application root or a subdirectory.

An ASP.NET Web forms file (page) that can contain Web controls and presentation and business logic.

For more information, see Creating ASP.NET Web Pages and ASP.NET Web Server Controls Overview.

.axd

Application root.

A handler file used to manage Web site administration requests, typically Trace.axd.

For more information, see ASP.NET Tracing Overview.

.browser

App_Browsers subdirectory.

A browser definition file used to identify the features of client browsers.

For more information, see ASP.NET Web Server Controls and Browser Capabilities.

.cd

Application root or a subdirectory.

A class diagram file.

For more information, see Working with Class Diagrams and Working with Class Diagrams (Class Designer).

.compile

Bin subdirectory.

A precompiled stub file that points to an assembly representing a compiled Web site file. Executable file types (.aspx, ascx, .master, theme files) are precompiled and put in the Bin subdirectory.

For more information, see ASP.NET Precompilation Overview.

.config

Application root or a subdirectory.

A configuration file (typically Web.config) containing XML elements that represent settings for ASP.NET features.

For more information, see ASP.NET Configuration Files.

.cs, .jsl, .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.

Class source-code file that is compiled at run time. The class can be an HTTP Module, an HTTP Handler, a code-behind file for an ASP.NET page, or a stand-alone class file containing application logic.

.csproj, .vbproj, vjsproj

Visual Studio project directory.

A project file for a Visual Studio client-application project.

For more information, see Projects and Solutions (How Do I for General Development) and Projects and Solutions (How Do I for General Development).

.disco, .vsdisco

App_WebReferences subdirectory.

An XML Web services discovery file used to help locate available Web services.

For more information, see XML Web Services Publishing and Deployment.

.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.

For more information, see XML Web Services Publishing and Deployment.

.dll

Bin subdirectory.

A compiled class library file (assembly). Note that instead of placing compiled assemblies in the Bin subdirectory, you can put source code for classes in the App_Code subdirectory.

For more information, see Shared Code Folders in ASP.NET Web Sites.

.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.

For more information, see How to: License Components and Controls.

.master

Application root or subdirectory.

A master page that defines the layout for other Web pages in the application.

For more information, see ASP.NET Master Pages.

.mdb, .ldb

App_Data subdirectory.

An Access database file.

For more information, see Accessing Data with ASP.NET.

.mdf

App_Data subdirectory.

SQL database file for use with SQL Server Express.

For more information, see Accessing Data with ASP.NET.

.msgx, .svc

Application root or a subdirectory.

An Indigo Messaging Framework (MFx) service file.

.rem

Application root or a subdirectory.

A remoting handler file.

For more information, see SOAP Message Modification Using SOAP Extensions.

.resources, .resx

App_GlobalResources or App_LocalResources subdirectory.

A resource file that contains resource strings that refer to images, localizable text, or other data.

For more information, see Resources in Applications or How to: Create Resource Files for ASP.NET Web Sites.

.sdm, .sdmDocument

Application root or a subdirectory.

A system definition model (SDM) file.

For more information, see Overview of the System Definition Model (SDM).

.sitemap

Application root.

A site-map file that contains the structure of the Web site. ASP.NET comes with a default site-map provider that uses site-map files to easily display a navigational control in a Web page.

For more information, see ASP.NET Site Navigation.

.skin

App_Themes subdirectory.

A skin file containing property settings to apply to Web controls for consistent formatting.

For more information, see ASP.NET Themes and Skins.

.sln

Visual Web Developer project directory.

A solution file for a Visual Web Developer project.

For more information, see Projects and Solutions (How Do I for General Development) and Projects and Solutions (How Do I for General Development).

.soap

Application root or a subdirectory.

A SOAP extension file.

For more information, see SOAP Message Modification Using SOAP Extensions.

File Types Managed by IIS

File types that are managed by ASP.NET are usually mapped to the asp.dll handler in 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.

For more information, see Global.asa Syntax in the IIS SDK.

.asp

Application root or a subdirectory.

An ASP Web page that contains @ directives and script code that uses the ASP built-in objects.

For more information, see IIS ASP Scripting Reference in the IIS SDK.

.cdx

App_Data subdirectory.

A compound index file structure file for Visual FoxPro.

For more information, see Compound Index File Structure in MSDN.

.cer

Application root or a subdirectory.

A certificate file used to authenticate a Web site.

For more information, see Certificates in the IIS Operations Guide.

.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 will be the last version to include IDC.

.shtm, .shtml, .stm

Application root or a subdirectory.

Mapped to ssinc.dll.

For more information, see IIS Server-Side Include Directives in the IIS SDK.

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 might allow browsers to view the 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.

See Also

Concepts

ASP.NET Precompilation Overview