ASP.NET - Application Life Cycle Principle

30 篇文章 0 订阅

/*

Author: Jiangong SUN

*/


Today, I want to share the knowledge about IIS, Application Life Cycle, request handling and so on.


ASP.NET web sites are developed with Web Forms, MVC, Web Pages and hosted in Internet Information Server (IIS). 

When  there is a page request, for example: http://www.example.com/index.aspx, IIS will use its Internet Server Application Programming Interface(ISAPI)

IIS will decide that the request will be treated by aspx(active server pages), ashx(active server handlers), ascx(active server controls) or asmx(active server methods).

If you want to treat any custom type of files, you need to create a custom handler and register it to IIS. 


The request handling process are Request -> IIS -> ISAPI -> Application Domain -> Http Runtime -> HttpContext -> MHPM(HttpModule, HttpHandler, Page life, HttpModule)


ASP.NET Web Forms Page life cycle is different from ASP.NET MVC.

In web forms, page life cycle model is:


ViewState and PostBack data are loaded in Page_PreLoad event. And Validate and Event are after Page_Load event.


Whereas in ASP.NET MVC it's more like:


There is not any code behind for pages in MVC. So, the page life cycle is totoally different.


I hope you enjoy this article. 



references:

http://msdn.microsoft.com/en-us/library/ms178473.aspx

http://msdn.microsoft.com/en-us/library/ms178472%28v=vs.100%29.aspx

http://wiki.asp.net/page.aspx/1512/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值