Thursday, September 13, 2007

File Types for asp.net web app

A web site Application can have multiple files of multiple file type. Many of these are managed by Asp.Net and many by IIS itself. File types that are managed by the Asp.Net are mapped to AspNet_isapi.dll in IIS. The file types that are not mapped to AspNet_isapi.dll are not managed by asp.net but by IIS only.

Here is a list of all the file types that are managed by Asp.Net.

.asax – The common most example is the Global.asax file. This normally contains code that is derived from HttpApplication class. The file contains application level event that are raised by application like Application start, application end etc. The file has to be kept in the root folder of the application.

.ascx – This file type is used to create web user control. The file can reside in either root folder on in a sub-directory.

.ashx – The file type is used to create generic handler by implementing the IHttpHandler interface.

.asmx – This file type is used to create a web service.

.aspx – The most common file for a asp.net web application. The file type is used for creating web pages.

.axd – This is a handler file for administration of web site request. Trace.axd is the best example for this file. The file is maintained in the root of the application.

.browser – This file type is kept only in the App_Browsers (which is a sub directory in the root of the application.) The file is used to identify the features of the client browser.

.config – the common example is the web.config file. The file can be kept in the root directory and also the sub directory. The file contains XML which defines the setting for the application. The config file in the sub directory represents setting for that directory only.

.cs, .vb (Not sure if any more are supported) – In App_code folder and as a code behind for aspx file. The file contains the source code of the file that will be compiled at the run time only for the first time it runs.

.dll – this is the compiled code or referenced assembly. The dll’s are kept in the bin folder in the root directory.

.pdb - it is a symbol file for the respective dll. used for debugging from within a running(live) app.

.master – used for the master page file in the application. It is used in defining the master design of the web site.

.mdf, .mdb, .ldb – These are the data files that are kept in the App_data folder.

.msgx, .svc – This file type is used for messaging framework service file.

.rem – Used for the remoting handler file.

.resources, .resx – The file type is used by the resource file where the resource string for images, localizable text etc are kept.

.sitemap – this file has to be kept in the root of the application. It contains the structure of the web site. We can then use the default site map provider to work with the sitemap file.

.skin - This file is kept in the App_Theme folder. This file is used for keeping consistent formatting of the web control through out the application.

.soap – This is a SOAP extension file.

No comments: