Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp.netÓÃurlÖØдURLReWriterʵÏÖÈÎÒâ¶þ¼¶ÓòÃû

Asp.net ÓÃurlÖØд(URLReWriter)ʵÏÖÈÎÒâ¶þ¼¶ÓòÃû
ÎÒ×î½üдÁ˸öСÀý×Ó,´ó¼Ò¿ÉÒÔÏÈ¿´Õâ¸ö,ÀïÃæÓÐСÀý×ÓµÄÍêÕû´úÂëÏÂÔØ.
http://www.cnblogs.com/notus/archive/2009/03/26/1422548.html 
ºÃ¾ÃûÓÐд¼¼ÊõÎÄÕÂ,Èç¹û´ó¼Ò¿´²»Ã÷°×,¾Í¶à¿´¼¸Æª,º¹,»òÕß,ÔÚÎÄÕµĺóÃæ»Ø¸´(ÕâÊÇ×îÓÐЧµÄ°ì·¨),ÎһᾡÁ¦°ïÖú´ó¼Ò½â´ðÒÉ»ó.
À´ÕÒÕâƪÎÄÕµÄ,Ó¦¸Ã¶¼ÖªµÀʲô½Ð¶þ¼¶ÓòÃû°É,·Ï»°¾Í²»ËµÁË.µ«ÊÇÌÖÂÛÇ°,ÏÈÒªÃ÷°×Ò»¸ö˼ÏëÎÊÌâ.
ºÜ¶àÅóÓÑÒ»Ö±¿¼ÂDz»Çå(ÎÒÇ°¼¸ÌìÒ²Ò»Ö±¸ã²»Ã÷°×)µÄÎÊÌâÊÇ,ÎÒ¼üÈëÒ»¸öµØÖ·ºó,ÔõôÕâ¸öurl¾Í±»ÖØдÁË?
µÚÒ»²½:ÔÚä¯ÀÀÆ÷¼üÈëÁËÒ»¸öµØÖ·,±ÈÈçhttp://love.kerry.com,µã»Ø³µºó,¶¼·¢ÉúÁËʲô?
ΪÁË°ÑÎÊÌâ¼òµ¥»¯,ÎÒÀ´ÕâÑù½âÊÍ:
µÚ¶þ²½:Ê×ÏÈ,¼üÈëµÄµØÖ·±»½âÎö,×îÖÕÀ´µ½ÁËһ̨web·þÎñÆ÷.½»¸øIIS´¦Àí.ÔÚ.netµÄÊÀ½çÖÐ,IIS»á°ÑÕâÑùµÄÇëÇóÔÙ½»¸øÒ»¸öweb´¦ÀíÆ÷ ´¦Àí,×îºó,¸Ã web´¦ÀíÆ÷ °Ñ´¦ÀíµÄ½á¹û·µ»Ø¸øä¯ÀÀÆ÷,ÏÔʾ¸øÓû§¿´.
Çë²»ÓúöÂÔÕâÑùÒ»¸öÎÊÌâ,µÚ¶þ²½µÄËùÓÐÊÂÇ鶼ÊÇÔÚ·þÎñÆ÷¶Ë×öµÄ.ÔÚÕâЩÊÂÇé½øÐеÄʱºò,Óû§¶ËµÄä¯ÀÀÆ÷ÉÏÃæµÄµØÖ·²»»á¸Ä±ä.¼´Ê¹×îºó web´¦ÀíÆ÷ °Ñ´¦Àí½á¹û·µ»ØÀ´µÄʱºò,ÉÏÃæµÄµØÖ·Ò²²»»á¸Ä±ä.
Ò»¿ªÊ¼¼üÈëµÄurl,Ö»ÊÇÆðÒ»¸öÇÃÃŵÄ×÷ÓÃ,ÃÅÇÃÍêÁË,×÷ÓþÍËã½áÊøÁË,Ö»ÓÐÄãµÄÑÛ¾¦¿ÉÒÔ¿´µ½ÄǸöµØÖ·,ä¯ÀÀÆ÷,·þÎñÆ÷µÈ¶¼²»ÖªµÀÕâ¸öµØÖ·.
È»ºóÒªÃ÷°×µÄÎÊÌâÊÇ,ËùνurlÖØд,Ò²Ö»ÊÇweb¿ª·¢ÈËÔ±ÖªµÀµÄÄÚÄ»Çé¿ö,Óû§¸ù±¾²»ÖªµÀ·¢ÉúÁËʲô,ËûÈÏΪ×Ô¼º¼üÈëµÄµØÖ·¾ÍÊÇÓ¦¸Ã³öÀ´ÆÁÄ»ÉÏÏÔʾµÄ½á¹û.Ò²¾ÍÊÇ˵,ÎÒÃÇÔÚÄ»ºó¿ØÖÆÒªÏÔʾµÄÄÚÈÝ.
½ÓÏÂÀ´Òª¿¼ÂǵÄÊÇ,ÔõôÑù¿ØÖÆÏÔʾµÄÄÚÈÝ?
´ÓÉÏÃæ˵µÄ¹ý³Ì,ºÜÃ÷ÏÔÒªÔÚ web´¦ÀíÆ÷ µÄ¹¤×÷ÕâÒ»²½¶¯ÊÖ½Å.
Ò»¸ö×î¼òµ¥µÄ¿¼ÂÇÊÇ,Óû§ÇÃÈëÁËÒ»¸ö¼òµ¥µÄ²»´øÈκβÎÊýµØÖ·, http://love.kerry.comÈ»ºóÎÒÃÇ°ÑÕâ¸öµØÖ·¸Ä³ÉÒ»¸ö·ûºÏ³ÌÐòÐèÒªµÄ´ø²ÎÊýµÄµØÖ·, http://kerry.com?lover=notus,×îºó´¦ÀíÖ®.
ËùνµÄurlÖØд,¾ÍÊÇÔÚÕâÒ»²½.
ÓÃ.netµÄÊõÓïÀ´Ëµ,ÎÒÃÇÐèÒª¸øÓ¦ÓóÌÐò×¢²áÒ»¸öhttpmodule,ÓÃÀ´´¦ÀíÌض¨µÄurl
×¢²áhttpmodule,ÔÚweb.config,
´¦Àíurl,ÔÚÎÒÃÇÌṩµÄhttpmodule³ÌÐòÖÐ
´óÌåÏ൱ÓÚÕâÑùµÄÒ»¶Î³ÌÐò
//ÓÃÎÒÃǵÄhttpmodule³ÌÐò½Ø»ñԭʼurl
String OriginalUrl=” http://love.kerry.com”;
//´¦Àíԭʼurl,µÃµ½×îºóÐèÒªµÄurl,ֵΪhttp://kerry.com?lover=notus
String FinalUrl=Rewrite(OriginalUrl);
// contextÖØн«urlÔÚÄÚ²¿·¢Ë͸øIIS´¦Àí
context.RewritePath(FinalUrl);
½ÓÏÂÀ´,ÎÒÃÇÀ


Ïà¹ØÎĵµ£º

dz̸ASP.net°²È«±à³Ì

ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔÇ°µÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕ߶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......

ASP.NETÒ³Ãæ¶ÔÏó

 Ò»¡¢Cookie ¸ÅÊö
1¡¢·½°¸
Cookie ÌṩÁËÒ»ÖÖÔÚ Web Ó¦ÓóÌÐòÖд洢Óû§Ìض¨ÐÅÏ¢µÄ·½·¨¡£ÀýÈ磬µ±Óû§·ÃÎÊÄúµÄÕ¾µãʱ£¬Äú¿ÉÒÔʹÓà Cookie ´æ´¢Óû§Ê×Ñ¡Ïî»òÆäËûÐÅÏ¢¡£µ±¸ÃÓû§ÔٴηÃÎÊÄúµÄÍøվʱ£¬Ó¦ÓóÌÐò±ã¿ÉÒÔ¼ìË÷ÒÔÇ°´æ´¢µÄÐÅÏ¢¡£
 
2¡¢±³¾°
      Cookie ÊÇһС¶ÎÎı¾ÐÅÏ¢£ ......

asp.net µ±Ç°Ò³ ¹Ø±Õ ¸¸ÀàÒ³

//ÔÚµ±Ç°Ò³ÖйرÕ
 Response.Write("<Script>window.opener.opener= null;window.opener.location.replace(window.opener.location.href='ideabank.aspx');window.close();</Script>");
//¸¸ÀàÒ³´ò¿ª ×ÓÒ³
 Response.Write("<script>window.open('upideabank.aspx?id="+id+"','','height=50 ......

ASP.NET

      ÿ´Î½«ÍøÒ³·¢Ë͵½·þÎñÆ÷ʱ£¬¶¼»á´´½¨ÍøÒ³ÀàµÄÒ»¸öÐÂʵÀý¡£ÔÚ´«Í³µÄ Web ±à³ÌÖУ¬Õâͨ³£Òâζ×ÅÔÚÿһ´ÎÍù·µÐгÌÖУ¬Óë¸ÃÒ³¼°¸ÃÒ³ÉϵĿؼþÏà¹ØÁªµÄËùÓÐÐÅÏ¢¶¼»á¶ªÊ§¡£ÀýÈ磬Èç¹ûÓû§½«ÐÅÏ¢ÊäÈëµ½Îı¾¿ò£¬¸ÃÐÅÏ¢½«ÔÚ´Óä¯ÀÀÆ÷»ò¿Í»§¶ËÉ豸µ½·þÎñÆ÷µÄÍù·µÐгÌÖжªÊ§¡£
ΪÁ˽â¾ö´«Í³µÄ Web ±à³Ìµ ......

ASP.NET


ASP.NET ÅäÖÃÎļþ¹¦ÄÜÓë ASP.NET ³ÉÔ±×ʸñ¡¢ASP.NET ½ÇÉ«¹ÜÀíÒÔ¼°ÆäËû ASP.NET ¹¦ÄÜʹÓÃͬһ»ùÓÚÌṩ³ÌÐòµÄ½á¹¹¡£ASP.NET ÅäÖÃÎļþ¹¦ÄÜÊÇÒ»¸ö·Ö²ãϵͳ£¬ÆäÖÐÅäÖÃÎļþ¹¦ÄܵŦÄÜ£¨ÌṩÀàÐÍ»¯ÊôÐÔÖµ²¢¹ÜÀíÓû§±êʶ£©Óë»ù´¡Êý¾Ý´æ´¢Çø·ÖÀë¡£ÅäÖÃÎļþ¹¦ÄÜÒÀÀµÓÚÅäÖÃÎļþÌṩ³ÌÐò£¨Êý¾ÝÌṩ³ÌÐò£©À´Ö´Ðд洢ºÍ¼ìË÷ÅäÖÃÎļþÊôÐÔ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ