¹ØÓÚASP.NETµÄIISÅäÖà ¡¡×ª
1.5.2 ÔÚIISÉÏÅäÖÃASP.NET
ÔÚ·þÎñÆ÷Éϲ¿ÊðASP.NETÍøվʱ£¬ÐèÒª.NETµÄÔËÐл·¾³.NET Framework¡£.NET FrameworkÀàËÆÓÚJavaµÄJDK£¬°üº¬ÓÐ.NET³ÌÐòÔËÐл·¾³ºÍÃüÁîÐбàÒ빤¾ß¡£Èç¹û·þÎñÆ÷ÉÏûÓа²×°.NET Framework£¬Õâ¾ÍÐèÒª´Ó΢ÈíÍøÕ¾ÏÂÔØ£¬ÏÂÔØÍøÖ·ÊÇ£º
http://msdn2.microsoft.com/zh-cn/default.aspx
»¹ÐèҪעÒâµÄÊÇ£¬Èç¹ûÏÈ°²×°.NET FrameworkÔÙ°²×°IISµÄ»°£¬ÐèÒªÔËÐÐÒ»¸öÃüÁîÏòIIS×¢²á.NET Framework£¬Õâ¸öÃüÁî¿ÉÒÔÔÚϵͳ·ÖÇøÖÐÕÒ¡£¼ÙÈç²Ù×÷ϵͳ°²×°ÔÚCÅ̲¢ÇÒ°²×°µÄ.NET FrameworkµÄ°æ±¾Îª2.0»ò¸ü¸ß°æ±¾£¬ÄÇôÕâ¸öÎļþµÄ·¾¶¾ÍÊÇ£º
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe
ÔÚ"ÔËÐÐ"´°¿ÚÊäÈ룺"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i"£¬Èç ͼ1-4Ëùʾ¡£
µ¥»÷"È·¶¨"°´Å¥¼´¿ÉÍê³É×¢²á¡£
ÎÒÃDz»·ÁÔÙ¶Ô·þÎñÆ÷½øÐÐÉîÈëÒ»µãµÄ̽Ë÷£¬ÔËÐÐIISÈí¼þ£¬´ò¿ªÈçͼ1-5ËùʾµÄ"InternetÐÅÏ¢·þÎñ"´°¿Ú¡£
ͼ1-4 ÔËÐÐÏòIIS×¢²á.NET FrameworkµÄÃüÁî
£¨µã»÷²é¿´´óͼ£©Í¼1-5 "InternetÐÅÏ¢·þÎñ"´°¿Ú
ÔÚ"ĬÈÏÍøÕ¾"½ÚµãÉϵ¥»÷ÓÒ¼ü£¬ÔÚµ¯³öµÄ¿ì½Ý²Ëµ¥ÖÐÑ¡Ôñ"ÊôÐÔ"£¬»á´ò¿ªÈçͼ1-6ËùʾµÄ"ĬÈÏÍøÕ¾ ÊôÐÔ"´°¿Ú¡£
ÎÒÃǻῴµ½¹²ÓÐ8¸öÑ¡Ï£¬·Ö±ðÊÇ"ÍøÕ¾"¡¢"ISAPIɸѡÆ÷"¡¢"Ö÷Ŀ¼"¡¢"Îĵµ"¡¢"Ŀ¼°²È«ÐÔ"¡¢"HTTPÍ·"¡¢"×Ô¶¨Òå´íÎó"ºÍ"ASP.NET"Ñ¡Ï¡£ÕâÀï½éÉܼ¸¸ö³£ÓÃÀ´½øÐÐÅäÖõÄÑ¡Ï¡£
£¨1£©"ÍøÕ¾"Ñ¡Ï£ºÓÃÀ´ÅäÖÃһЩ³£¹æÊôÐÔ£¬±ÈÈçÍøվʹÓõĶ˿ںš¢IPµØÖ·µÈÐÅÏ¢¡£Web·þÎñÆ÷µÄĬÈ϶˿ںÅÊÇ80£¬Èç¹û²»ÊìϤIIS£¬Ôò²»½¨ÒéÐÞ¸ÄĬÈ϶˿ںš£
£¨2£©"Ö÷Ŀ¼"Ñ¡Ï£ºÓÃÀ´ÉèÖÃÍøÕ¾»òÕßÐéÄâĿ¼µÄÎïÀí·¾¶ºÍÖ´ÐÐȨÏ޵ȣ¬Èçͼ1-7Ëùʾ¡£
£¨µã»÷²é¿´´óͼ£©Í¼1-6 "ĬÈÏÍøÕ¾ ÊôÐÔ"´°¿Ú
£¨µã»÷²é¿´´óͼ£©Í¼1-7 "Ö÷Ŀ¼"Ñ¡Ï
ÔÚ"Ö÷Ŀ¼"Ñ¡ÏÖл¹¿ÉÒÔÉèÖÃÓ¦ÓóÌÐòÓ³Éä¡£µ¥»÷"ÅäÖÃ"°´Å¥£¬»á´ò¿ªÈçͼ1-8ËùʾµÄ"Ó¦ÓóÌÐòÅäÖÃ"´°¿Ú¡£
´Óͼ1-8ÖпÉÒÔ¿´µ½£¬µ±ÎÒÃÇÕýÈ·°²×°ÁËIISºÍ.NET FrameworkÖ®ºó£¬ÒÔ.aspxΪºó׺µÄ¶¯Ì¬Ò³Ãæ¾ÍÄܽ»¸øÖ¸¶¨µÄ½Å±¾ÒýÇæÖ´ÐÐÁË¡£Ñ¡ÖÐ.aspxÎļþ²¢µ¥»÷"±à¼"°´Å¥£¬»áµ¯³öÒ»¸öд°¿Ú£¬Èçͼ1-9Ëùʾ¡£
´Óͼ1-9ÖпÉÒÔ¿´³ö£¬.aspxÒ³Ã涼Êǽ»ÓÉaspnet_isapi.dllÖ´Ðеġ£Èç¹ûÓÐ×Ô¶¨ÒåµÄÎļþÀàÐÍÐèÒª½»ÓÉ·þÎñÆ÷½øÐд¦Àí£¬Ôò¿ÉÒÔÔÚÕâÀïÅäÖá£
£¨µã»÷²é¿´´óͼ£©Í¼1-8 "Ó¦ÓóÌÐòÅäÖÃ"´°¿Ú
ͼ1-9 "Ìí¼Ó/±à¼Ó¦ÓóÌÐòÀ©Õ¹ÃûÓ³Éä"´°¿Ú
£¨3£©"Îĵµ"Ñ¡Ï£ºÓÃÓÚÉèÖÃÍøÕ¾Æðʼҳ
Ïà¹ØÎĵµ£º
HttpHandlerʵÏÖÁËÀàËÆÓÚISAPI ExtentionµÄ¹¦ÄÜ£¬Ëû´¦ÀíÇëÇó(Request)µÄÐÅÏ¢ºÍ·¢ËÍÏìÓ¦(Response)¡£HttpHandler¹¦ÄܵÄʵÏÖͨ¹ýʵÏÖIHttpHandler½Ó¿ÚÀ´´ïµ½¡£¶øHttpModuleʵÏÖÁËÀàËÆÓÚISAPI FilterµÄ¹¦ÄÜ¡£
HttpModuleµÄʵÏÖ
HttpModulesʵÏÖÁËÀàËÆÓÚISAPI FilterµÄ¹¦ÄÜ£¬ÔÚ¿ª·¢ÉÏ£¬Í¨³£ÐèÒª¾¹ýÒÔϲ½Ö裺
±àдһ¸öÀà£¬Ê ......
1¡¢½¨Á¢Êý¾Ý²ã Á¬½ÓÊý¾Ý¿â->½¨Á¢Êý¾Ý¼¯*.xsd->±íÖн¨Á¢²éѯ·½·¨
2¡¢½¨Á¢ÒµÎñÂß¼²ã °ü×°TableAdapter·½·¨³ÉÀà
3¡¢½¨Á¢Ä¸°åÒ³ºÍÕ¾µãµ¼º½£¨ CSS´ýѧϰ£©
4¡¢Ê¹ÓÃÊý¾ÝÔ´Õ¹ÏÖÊý¾Ý ÎåÖÖÊý¾ÝÔ´ ±à¼Êý¾ÝÔ´²ÎÊý ʹÓÃtableadapter·½·¨
5¡¢Ê¹ÓÃdropDownList¹ýÂËÖ÷-´Ó±¨±í
ʹÓÃtableadapter·½·¨ ......
Ϊÿ¸öÓû§´æ´¢ÅäÖÃÐÅÏ¢ ÒÔÇ°±£´æÓû§ÅäÖÃÐÅϢʱÓõ½µÄÊÇsessionºÍcookie¡£ session»á»°½áÊø£¬±£´æµÄ¸öÈËÐÅÏ¢¾Í»á¶ªÊ§£¬¶øcookieÔÚÒ»¶¨³Ì¶ÈÉÏ´æÔÚ°²È«Òþ»¼
asp.net 2.0ÒýÈëµÄprofile¼¼Êõ ¿ÉÒԺܺõĽâ¾ö¸ÃÎÊÌâ¡£
Ç¿ÀàÐÍ ³¤ÆÚ±£´æ Ö§³ÖÄäÃûÓû§
¶¨ÒåÅäÖã¨profile£©
<?xml version="1.0"?>
<c ......
ASP.NET
ʹÓÃÎÞCookieµÄ±íµ¥ÈÏ֤Ʊ¾Ý
ĬÈÏÇé¿öÏ£¬forms authentication system½«¾ö¶¨Êǽ«Æ±¾Ý´æ´¢ÔÚcookies
collectionÀﻹÊDzåÈëÓû§·ÃÎÊÒ³ÃæµÄURLÀï¡£ËùÓÐÖ÷Á÷µÄ×ÀÃæä¯ÀÀÆ÷£¬±ÈÈçInternet
Explorer£¬Firefox£¬Opera£¬»òSafari¶¼Ö§³Öcookies£¬µ«²¢·ÇËùÓеÄÒƶ¯É豸¶¼Ö§³Ö¡£
forms authentication systemʹÓúÎÖÖco ......
ASP.NET Êý¾Ý¿Ø¼þ:GridView,DataList,Repeater ,DetailsView,FormView¡£
ASP.NET Êý¾Ý¿Ø¼þ×ÛÊö£º
1.Ç°3¸öÓÃÓÚ³ÊÏÖ¶àÌõ¼Ç¼,ºóÃæ2¸öÓÃÓÚ³ÊÏÖµ¥ÌõÊý¾ÝÃ÷ϸ,¼´³£ÓõļǼÃ÷ϸ¡£
2.GridViewºÍDetailsView¿Ø¼þµÄ²¼¾Ö¹Ì¶¨,×Ô¶¨ÒåÊý¾ÝÏÔʾµÄ²¼¾Ö¹¦ÄÜÓÐÏÞ,Ò»°ãÊʺϲ¼¾Ö¼òµ¥µÄÊý¾Ý³ÊÏÖ¡£
3.DataList,RepeaterºÍFormViewÊý¾Ý ......