IIS URL Rewriting ºÍ ASP.NET routing£¨ÉÏ£©
а汾URL-rewrite module for IIS 7.0µÄ·¢²¼ÁË£¬ASP.NET Routing×é¼þËæ×Å.NET Framework 3.5 SP1µÄ·¢²¼£¬²¢ÔÚ.NET Framework 4.0 BetaÖнøÒ»²½³ÉÊì¡£×÷ΪASP.NET ¿ª·¢ÈËÔ±£¬ÎÒÃDz»Ãâ»á¶ÔÕâÁ½¸ö¹¦ÄÜÏà½üµÄ×é¼þ±§ÓÐÐí¶àÒÉÎÊ£¬ÖîÈç“ËüÃÇÓÐʲôÒìͬ£¿”“·Ö±ðÊÊÓÃÓÚʲô»·¾³£¿”µÈµÈ¡£±¾ÎÄÖ¼ÔÚÃèÊöÕâÁ½ÕßÖ®¼äµÄÒìͬ£¬²¢Îª¿ª·¢ÈËÔ±ÌṩʲôʱºòʹÓÃÄÄÒ»ÖÖ½â¾ö·½°¸µÄ½¨Òé¡£
´Ó±íÃæÉÏ¿´À´£¬ÕâÁ½ÖÖ¼¼ÊõËƺõÌṩÁ˷dz£ÏàËƵŦÄÜ£ºÎªÍøÕ¾ÌṩÓû§ÓѺõġ¢ËÑË÷ÒýÇæÓѺõÄUrl¡£È»¶ø£¬ÔÚÕâÁ½ÖÖ¼¼ÊõÔÚÔÀíÉÏÈ´ÓÐ×ű¾ÖʵÄÇø±ð£¬ÐèÒªÉîÈëÀí½â²ÅÄÜÔÚÑ¡ÔñÓ¦ÓÃʱ×ö³öÕýÈ·µÄ¾ö²ß¡£ÎªÁË°ïÖú´ó¼ÒÀí½âÕâÁ½ÖÖ¼¼Êõ£¬ÎÒÃÇÊ×ÏÈ´ÓËûÃǵÄÔË×÷ÔÀí¿ªÊ¼½²Æð¡£
±¾ÎÄ·Òë×ÔIIS¹Ù·½ÍøÕ¾£¬Õë¶Ô¹úÄÚ¹ßÓõÄÊõÓï½øÐÐÁ˲¿·Öµ÷Õû¡£
URLÖØд(URL Rewriting)
URL RewritingÒѾ²»ÊÇʲôм¼ÊõÁË£¬´óÔ¼ÔÚ10ÄêÇ°¾ÍÒѾÔÚApache·þÎñÆ÷ÉϹ㷺ӦÓá£ÓÉÓÚËü±»¹«ÈÏΪÊÇweb¹ÜÀíÔ±ºÍ¿ª·¢ÈËÔ±µÄ·¨±¦£¬Ðí¶àÁ÷ÐеĻùÓÚApacheµÄÍøÕ¾¶¼ÒÀÀµÓÚUrlÖØдÀ´Ìṩ“ÓÅÑÅ”µÄUrl¡£
¼òµ¥µÄ˵£¬URLÖØдµÄÀíÄî·Ç³£¼òµ¥£ºµ±Ò»¸ö¿Í»§¶ËÏò·þÎñ¶ËÇëÇóÒ»¸öÌض¨µÄURLʱ£¬URLÖØдģ¿é»á·ÖÎöËùÇëÇóµÄURL²¢°ÑÇëÇó¸ü¸Ä£¬Ö¸ÏòͬһWeb·þÎñÆ÷ÉϵÄÁíÒ»¸öURL¡£ÔÚwebÇëÇóÖÜÆÚÖвåÈëURLÖØдģ¿é£¨Èçͨ¹ýHttpModule£©·Ç³£¼òµ¥£¬ËùÒÔ£¬ËüÄܹ»ÔÚ·þÎñÆ÷´¦ÀíÇëÇó֮ǰÀ´ÐÞ¸ÄËùÇëÇóµÄURL¡£¶ø·þÎñ¶ËµÄ´¦Àí³ÌÐò»á¸ù¾ÝÖØдºóµÄURLÀ´Éú³ÉÒ»¸öResponseµ½¿Í»§¶Ëä¯ÀÀÆ÷¡£ÓÉÓÚÖØд¹ý³Ì·¢ÉúÔÚ·þÎñ¶Ë£¬ËùÒÔ¿Í»§¶Ëä¯ÀÀÆ÷¸ù±¾¿´²»µ½ÖØдºóµÄURL£¬ÔÚ¿Í»§¶Ë¿´À´£¬ËûËùÊÕµ½µÄResponseÀ´×ÔÔÀ´ËùÇëÇóµÄURL¡£
ÔÚIIS 7.0µÄ¼Ü¹¹ÖУ¬Õâ¸ö¹ý³Ì¿ÉÒÔÓÉÏÂͼÀ´Õ¹Ê¾£º
΢ÈíËùÌṩµÄURLÖØдģ¿é(URL-rewrite module)ÊÇÒ»¸önative-codeµÄÄ£¿é£¬²åÈëwebÇëÇó´¦Àí¹ý³ÌµÄPre-begin Request »ò Begin Request ½×¶Î£¬È»ºóͨ¹ýËùÅäÖõÄһϵÁÐÖØд¹æÔòÀ´½øÐÐURLÖØд¡£Ã¿Ò»¸öÖØд¹æÔò¶ÔURL½øÐÐÕýÔò·ÖÎö£¬ÅжÏÊÇ·ñµ±Ç°ËùÇëÇóµÄURLÂú×ãÖØд¹æÔòËù¶¨ÒåµÄÌõ¼þ£¬Èç¹ûÂú×㣬¾Í¸ù¾Ý¹æÔò½«ÔÀ´µÄURLÖØд³ÉÒ»¸öеÄURL¡£µ±ËùÓеÄÖØд¹æÔò¶¼¹ýÁËÒ»±éÖ®ºó£¬URLÖØдģ¿é»áÉú³ÉÒ»¸ö×îÖÕµÄURL·¾¶£¬´«µÝ¸øÊ£ÓàµÄÇëÇó´¦Àí¹ý³Ì¡£Ò²¾ÍÊÇ˵IIS¹ÜµÀÖеÄÇëÇó´¦Àí³ÌÐòËù´¦ÀíµÄÊÇÔÚURLÖØдģ¿éËùдºóµÄURL¡£
ASP.NET·ÓÉ(ASP.NET Routing)
´Ó±¾ÖÊÉÏÀ´Ëµ£¬ASP.NET·ÓÉÊÇÒ»ÖÖÇëÇóµ÷¶È»úÖÆ£¬ËüÔÊÐí¿ª·¢Õß½«·ûºÏÖ¸¶¨¹æÔòµÄURL¹ØÁª¸øÒ»¸öÄܹ»´¦ÀíÕâ¸öÇëÇóµÄHandlerÀ´½øÐ
Ïà¹ØÎĵµ£º
ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔÇ°µÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕ߶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......
dz̸ASP.NETÖеÄÈýÖֻỰ״̬
³£ÓõÄASP.NETµÄ»á»°×´Ì¬ÖÐÓÐÈýÖÖ.·ÖΪ½ø³ÌÄڻỰ״̬¡¢×´Ì¬·þÎñÆ÷»á»°×´Ì¬¡¢SQL Server »á»°×´Ì¬
ÏÈ̸̸½ø³ÌÄڻỰ״̬£¨Inprocess£©ÕâÊÇÒ»ÖÖĬÈϵÄģʽ£¬µ«ÊÇÖ»ÒªÔÚWeb.configÖнøÐмòµ¥µÄÅäÖþͿɽøÐиü¸Ä£¬¾ßÌå ......
1£¬ÔÚweb·þÎñÆ÷ÉÏ°²×°OracleÊý¾Ý¿â¿Í»§¶Ë£¬ÕâÊÇÁ¬½ÓOracleÊý¾Ý¿âµÄ»ù´¡£¨µ«£¬²»Ò»¶¨ÊDZØÐëµÄ£©¡£
2£¬ÔÚ¿Í»§¶ËµÄNet Manager ÖнøÐÐÅäÖ÷þÎñµÄÃû³Æ£¬ÅäÖÃÈçͼ£¨ÕâÒ»µã·Ç³£µÄÖØÒªÒÔºóµÄÁ´½ÓÈ«¶¼ÔÚÕâ¸ö·þÎñÃû³ÆµÄ»ù´¡ÉϽøÐеģ©
3£¬ASPÁ´½Ó·þÎñµÄÁ´½Ó×Ö·û´®ºÍ·½·¨ÈçÏ£º
<%
connstr= "Provider=MSDAORA.1;Password=***; ......
Ò».Response¶ÔÏóµÄWrite·½·¨ÓëJavaScript½Å±¾ÓïÑԵĽáºÏʹÓÃ.(page_51)
µ¯³öÌáʾ¶Ô»°¿ò.
Response.Write("<script>alert('ÄãºÃ!');</script>");
2.¹Ø±Õ´°¿Ú
Response.Write("<script>window.opener=null;window.close();script>");
¶þ.»ñÈ¡¿Í»§¶ËIPµØÖ·.(page_54)
1. ͨ¹ýRequestµ ......
Ò»£ºasp.netÔõôÁ¬½ÓmysqlÊý¾Ý¿â
ÏÂÔØmysql connectionµÄ¶«Î÷
http://dev.mysql.com/downloads/connector/net/6.2.html
ÓÐ3¸ödownloadÑ¡µÚÒ»¸öÏÂÔØ
Windows (x86, 32-bit), ZIP Archive
mysql-connector-net-6.2.2-noinstall.zip ......