ASP.NET¶ÔÇëÇó´¦ÀíµÄ¹ý³Ì
ASP.NET¶ÔÇëÇó´¦ÀíµÄ¹ý³Ì
µ±ÇëÇóÒ»¸ö*.aspxÎļþµÄʱºò£¬Õâ¸öÇëÇó»á±»inetinfo.exe½ø³Ì½Ø»ñ£¬ËüÅжÏÎļþµÄºó׺£¨aspx£©Ö®ºó£¬½«Õâ¸öÇëÇóת½»¸ø ASPNET_ISAPI.dll£¬ASPNET_ISAPI.dll»áͨ¹ýhttp¹ÜµÀ£¨Http PipeLine£©½«ÇëÇó·¢Ë͸øASPNET_WP.exe½ø³Ì£¬ÔÚASPNET_WP.exe½ø³ÌÖÐͨ¹ýHttpRuntimeÀ´´¦ÀíÕâ¸öÇëÇ󣬴¦ÀíÍê±Ï½«½á¹û·µ»Ø¿Í»§¶Ë¡£
l inetinfo.exe½ø³Ì£º
ÊÇwww·þÎñµÄ½ø³Ì£¬IIS·þÎñºÍASPNET_ISAPI.DLL¶¼¼Ä´æÔڴ˽ø³ÌÖС£
l ASPNET_ISAPI.DLL£º
ÊÇ´¦Àí.aspxÎļþµÄwin32×é¼þ¡£ÆäʵIIS·þÎñÆ÷ÊÇÖ»ÄÜʶ±ð.htmlÎļþµÄ£¬µ±IIS·þÎñÆ÷·¢ÏÖ±»ÇëÇóµÄÎļþÊÇ.aspxÎļþʱ£¬IIS·þÎñÆ÷½«Æä½»¸øaspnet_isapi.dllÀ´´¦Àí¡£
l aspnet_wp.exe½ø³Ì£º
ASP.NET¿ò¼Ü½ø³Ì£¬Ìṩ.netÔËÐеÄÍйܻ·¾³£¬.netµÄCLR(¹«¹²ÓïÑÔÔËÐÐʱ)¾ÍÊǼĴæÔڴ˽ø³ÌÖС£
ASP.NET Framework´¦ÀíÒ»¸öHttp RequestµÄÁ÷³Ì
HttpRequest-->inetinfo.exe-->ASPNET_ISAPI.dll-->ASPNET_WP.exe-->HttpRuntime-->HttpApplication Factory-->HttpApplication-->HttpModule-->HttpHandler Factory-->HttpHandler-->HttpHandler.ProcessRequest()
ASP.NETÇëÇó´¦Àí¹ý³ÌÊÇ»ùÓڹܵÀÄ£Ð͵ģ¬Õâ¸ö¹ÜµÀÄ£ÐÍÊÇÓɶà¸öHttpModuleºÍHttpHandler×é³É£¬ASP.NET °ÑhttpÇëÇóÒÀ´Î´«µÝ¸ø¹ÜµÀÖи÷¸öHttpModule£¬×îÖÕ±»HttpHandler´¦Àí£¬´¦ÀíÍê³Éºó£¬Ôٴξ¹ý¹ÜµÀÖеÄHTTPÄ£¿é£¬°Ñ½á¹û·µ»Ø¸ø¿Í»§¶Ë¡£ÎÒÃÇ¿ÉÒÔÔÚÿ¸öHttpModuleÖж¼¿ÉÒÔ¸ÉÔ¤ÇëÇóµÄ´¦Àí¹ý³Ì¡£
×¢Ò⣺ÔÚhttpÇëÇóµÄ´¦Àí¹ý³ÌÖУ¬Ö»Äܵ÷ÓÃÒ»¸öHttpHandler£¬µ«¿ÉÒÔµ÷Óöà¸öHttpModule¡£
µ±ÇëÇóµ½´ïHttpModuleµÄʱºò£¬ÏµÍ³»¹Ã»ÓжÔÕâ¸öÇëÇóÕæÕý´¦Àí£¬µ«ÊÇÎÒÃÇ¿ÉÒÔÔÚÕâ¸öÇëÇ󴫵ݵ½´¦ÀíÖÐÐÄ£¨HttpHandler£©Ö®Ç°¸½¼ÓһЩÆäËüÐÅÏ¢£¬»òÕ߽ػñµÄÕâ¸öÇëÇó²¢×÷һЩ¶îÍâµÄ¹¤×÷£¬Ò²»òÕßÖÕÖ¹ÇëÇóµÈ¡£ÔÚHttpHandler´¦ÀíÍêÇëÇóÖ®ºó£¬ÎÒÃÇ¿ÉÒÔÔÙÔÚÏàÓ¦µÄHttpModuleÖаÑÇëÇó´¦ÀíµÄ½á¹û½øÐÐÔٴμӹ¤·µ»Ø¿Í»§¶Ë¡£
HttpModule
HTTPÄ£¿éÊÇʵÏÖÁËSystem.Web.IhttpModule½Ó¿ÚµÄÀà¡£
IHttpModule½Ó¿ÚµÄÉùÃ÷£º
public interface IHttpModule
{
&
Ïà¹ØÎĵµ£º
ÏÖÔÚ´Ó¶ÔASP.NETÒ³ÃæµÄÖ´ÐÐ˳Ðò¿ªÊ¼£¬Ìå»áÒ»ÏÂB/S½á¹¹µÄ³ÌÐòµÄÌص㣬ÏÂͼÊÇASP.NETÒ³ÃæµÄÖ´ÐÐ˳Ðò˵Ã÷£º
¡¡¡¡Page_Init£¨Ò³Ãæ³õʼ»¯Òý·¢µÄʼþ£©——>Page_Load£¨¼ÓÔØÒ³ÃæʱÒý·¢µÄʼþ£©——>Control Event£¨·þÎñÆ÷¿Ø¼þÒý·¢µÄʼþ£©——>Page_UnLoad£¨Ò³Ãæ´ÓÄÚ´æÖÐÐ¶Ô ......
asp.net2.0ѧϰÀú³Ì ²ËÄñµ½Öм¶³ÌÐòÔ±µÄ·ÉÔ¾
2007-06-27 11:08:02 ±¾ÎÄÒѹ«²¼µ½²©¿ÍƵµÀÖ°³¡·´´Òµ·ÖÀà
Èç¹ûÄãÊÇÒ»¸ö²ËÄñ»òÕß×ÔÈÏΪ³õѧÕßÄÇô±¾Îķdz£ÊʺÏÄ㣻
²»ÄÜ˵Õâ30±¾Êé¾ÍÊÇ×î¼Ñ×éºÏ£¬µ«ÊÇ¿ÉÒÔ˵Õâ¸ö×éºÏ²»²î£»
±¾ÈËÔø²©ÀÀȺÊ飬ºÜ¶àÊéÖظ´£¬ºÜ¶àÊé½²µÄ²»ÊÊÓã¬ÕâЩÊ鶼ÊÇÄ¿Ç°Êéµê¿ÉÒÔÂòµ½µÄ£»
´ïµ½Öм ......
·¢²¼ÖÐÓöµ½ÁËÁ½¸öÎÊÌâ
Ò»¡£session »á¶Ìʱ¼ä×Ô¶¯Ïûʧ
½â¾ö°ì·¨
1¡£ÔÚwww.google.comÖвésession ¶ªÊ§
2¡£ÔÚWindow·þÎñÖн«ASP.NET State Service Æô¶¯¡£
3¡£ÐÞ¸Äweb.config
<system.web>
add <sessionState mode="StateServer" timeout="60"/>
¶þ¡£sql server ³¬¹ý×î´óÁ¬½Ó³ØÊý
......
¡¡¡¡ÓÉÓÚÓõÄÊÇVPSÖ÷»ú£¬²»ÖªµÀɶÔÒòSESSION×ÜÊǶªÊ§£¬ÎÞÄλ»Cookies¡£
¡¡¡¡²éÒ»ÏÂMSDN£¬ÔÚASP.NETÓÐÁ½¸öCOOKIES£¬Response.CookiesºÍRequest.Cookies£¬ÎÞÂÛÓÃÄĸö¶¼²»ÐУ¬Ìí¼Ó½øÈ¥ºó¾Í¶ÁÈ¡²»µ½
ºóÀ´·¢ÏÖͨ¹ýResponse.CookiesÌí¼Ó¡¢Request.Cookies¶ÁÈ¡²ÅÐС£ÏÂÃæÊÇÌí¼Ó¡¢¶ÁÈ¡¡¢É¾³ýµÄ´úÂ룺
//Ìí¼Ó
HttpCookie c = ne ......
200XÄê12ÔÂ23ÈÕµÄÒ»´ÎÃæÊÔ¾Àú£¨¹²ÁùÂÖ£©£¬ÖÁ´Ë9-XÖÜÄêÖ®¼Ê£¬ºÍ¸÷λÅóÓÑ·ÖÏí£¬Ï£Íû¶Ô¸÷λÅóÓÑÓÐÓã¬ÓÐЩ×Ô¼ºµÄ´ð°¸Ìù³öÀ´Ò²½ö½öÊÇÅ×שÒýÓñ£¬Ï£Íû¸÷λÅóÓѲ»Áߴͽ̣¬Ëµ¾äÀÏʵ»°£¬ÃæÊÔµÄʱºòʱ¼äºÜ½ô£¬ºÜÄÑ¿¼ÂÇ×îÓÅËã·¨¡£
ÆðÒòÊÇÅóÓÑÍƼöÎÒÈ¥W¹«Ë¾Ó¦Æ¸Senior SDEÕâ¸öְλ£¬Ó¦¸ÃËãÊÇÄÚ²¿ÍƼöÁË£¬ÏÂÃæÊÇÕÐƸҪÇó
Title: Senio ......