ASP.NET"ÕýÔÚÖÐÖ¹Ïß³Ì"´íÎóÔ¼°½â¾ö·½·¨
×î½ü×öµÄϵͳÖÐÀϳöÏÖµÄһЩÎÊÌⲻ̫Ã÷°×£¬ÔÚʹÓà Response.End¡¢Response.Redirect »ò Server.Transfer ʱ³öÏÖ ThreadAbortException £¬±¾À´ÏµÍ³ÊÇûÓÐÎÊÌâµÄ£¬ÔÚ±£´æÊý¾ÝʱҲ¿ÉÒÔÕý³££¬±¾À´Ê¹ÓÃtry-catch Óï¾äÊÇÓÃÀ´²¶»ñÒ»Òì³£Çé¿öµÄ£¬µ«ÏµÍ³Õý³££¬Àϲ¶»ñµ½ÏÂÃæµÄ¶«Î÷
##[²Ù×÷¼Ç¼]£º2010-02-23 9:25:12 System.Threading.ThreadAbortException: ÕýÔÚÖÐÖ¹Ï̡߳£
Ö¢×´
Èç¹ûʹÓà Response.End¡¢Response.Redirect »ò Server.Transfer ·½·¨£¬½«³öÏÖ ThreadAbortException Òì³£¡£Äú¿ÉÒÔʹÓà try-catch Óï¾ä²¶»ñ´ËÒì³£¡£
ÔÒò
<!-- Inject Script Filtered -->
Response.End ·½·¨ÖÕÖ¹Ò³µÄÖ´ÐУ¬²¢½«´ËÖ´ÐÐÇл»µ½Ó¦ÓóÌÐòµÄʼþ¹ÜÏßÖÐµÄ Application_EndRequest ʼþ¡£²»Ö´ÐÐ Response.End ºóÃæµÄ´úÂëÐС£
´ËÎÊÌâ³öÏÖÔÚ Response.Redirect ºÍ Server.Transfer ·½·¨ÖУ¬ÒòΪÕâÁ½ÖÖ·½·¨¾ùÔÚÄÚ²¿µ÷Óà Response.End¡£
½â¾ö·½°¸
Òª½â¾ö´ËÎÊÌ⣬ÇëʹÓÃÏÂÁз½·¨Ö®Ò»£º
¶ÔÓÚ Response.End£¬µ÷Óà HttpContext.Current.ApplicationInstance.CompleteRequest ·½·¨¶ø²»ÊÇ Response.End ÒÔÌø¹ý Application_EndRequest ʼþµÄ´úÂëÖ´ÐС£
¶ÔÓÚ Response.Redirect£¬ÇëʹÓÃÖØÔØ Response.Redirect(String url, bool endResponse)£¬¸ÃÖØÔØ¶Ô endResponse ²ÎÊý´«µÝ false ÒÔÈ¡Ïû¶Ô Response.End µÄÄÚ²¿µ÷Óá£ÀýÈ磺
Response.Redirect ("nextpage.aspx", false);
Èç¹ûʹÓôËÌæ´ú·½·¨£¬½«Ö´ÐÐ Response.Redirect ºóÃæµÄ´úÂë¡£
¶ÔÓÚ Server.Transfer£¬Çë¸ÄÓà Server.Execute ·½·¨¡£
Ïà¹ØÎĵµ£º
ת×Ô£ºhttp://www.cnblogs.com/sunrack/archive/2009/10/16/1584427.html
theme¾ÍÊÇһϵÁÐÊôÐÔÉèÖã¬ÀûÓÃËü¿ÉÒÔ¶¨ÒåÒ³ÃæºÍ¿Õ¼äµÄÍâ¹Û¡£Ëü¿ØÖƵķ¶Î§¿ÉÒÔÊÇÄ³Ð©ÍøÒ³¡¢Õû¸öwebÓ¦ÓóÌÐò£¬ÉõÖÁ¿ÉÒÔÊÇÒ»¸ö·þÎñÆ÷ÉϵÄËùÓÐWebÓ¦Óá£
themeºÍ¿Ø¼þƤ·ô
themeÓÉһϵÁÐÔªËØ×é³É£ºÆ¤·ô¡¢css¡¢Í¼Æ¬ÒÔ¼°ÆäËü×ÊÔ´¡£ËüÖÁÉÙ°üº¬Æ¤·ô¡£the ......
ASP.NET³£ÓõÄ6ÖÖÑéÖ¤¿Ø¼þ£¬ÈçÏ£º
RequiredFieldValidator £¨±ØÐë×Ö¶ÎÑéÖ¤£© ÓÃÓÚ¼ì²éÊÇ·ñÓÐÊäÈëÖµ
CompareValidator £¨±È½ÏÑéÖ¤£© °´É趨±È½ÏÁ½¸öÊäÈë
RangeValidator £¨·¶Î§ÑéÖ¤£© ÊäÈëÊÇ·ñÔÚÖ¸¶¨·¶Î§
RegularExpressionValidator £¨Õ ......
Ò»¡¢Èý²ãÌåϵ¼Ü¹¹¡¡¡¡1.±íʾ²ã(USL)£ºÖ÷Òª±íʾWEB·½Ê½£¬Ò²¿ÉÒÔ±íʾ³ÉWINFORM·½Ê½¡£Èç¹ûÂß¼²ãÏ൱ǿ´óºÍÍêÉÆ£¬ÎÞÂÛ±íÏÖ²ãÈçºÎ¶¨ÒåºÍ¸ü¸Ä£¬Âß¼²ã¶¼ÄÜÍêÉÆµØÌṩ·þÎñ¡£
¡¡¡¡2.ÒµÎñÂß¼²ã(BLL)£ºÖ÷ÒªÊÇÕë¶Ô¾ßÌåµÄÎÊÌâµÄ²Ù×÷£¬Ò²¿ÉÒÔÀí½â³É¶ÔÊý¾Ý²ãµÄ²Ù×÷£¬¶ÔÊý¾ÝÒµÎñÂß¼´¦Àí¡£Èç¹û˵Êý¾Ý²ãÊÇ»ýľ£¬ÄÇÂß¼²ã¾ÍÊǶÔÕâЩ»ýľµÄ ......
1.ʲôÊÇcookie?
cookie ÊÇһС¶ÎÎı¾ÐÅÏ¢£¬°éËæÓû§ÇëÇó£¬ÔÚweb·þÎñÆ÷ºÍä¯ÀÀÆ÷Ö®¼ä´«µÝ¡£Óû§Ã¿´Î·ÃÎÊÕ¾µãµÄʱºò£¬
webÓ¦ÓóÌÐò¶¼¿ÉÒÔ¶ÁÈ¡cookie°üº¬µÄÐÅÏ¢¡£
¼ÙÉèÔÚÓû§ÇëÇóÄúµÄÍøÕ¾µÄij¸öÒ³ÃæÊ±£¬ÄúµÄÓ¦ÓóÌÐò²»½öÊÇ·µ»ØÇëÇóµÄÒ³Ãæ¡£Í¬Ê±Ò²·µ»ØÒ»¸ö°üº¬ÈÕÆÚ
ºÍʱ¼äµÄcookie¡£Óû§µÄä¯ÀÀÆ÷ÔÚ»ñµÃÒ³ÃæµÄͬʱҲ»ñµÃÁË ......
IIS×ÔÉíÊDz»ÄÜ´¦ÀíÏñASPXÀ©Õ¹ÃûÕâÑùµÄÒ³Ãæ£¬Ö»ÄÜÖ±½ÓÇëÇóÏñHTMLÕâÑùµÄ¾²Ì¬Îļþ£¬Ö®ËùÒÔÄÜ´¦ÀíASPXÕâÑùÀ©Õ¹ÃûµÄÒ³Ãæ£¬ÊÇÒòΪIISÓÐÒ»¸öISAPI¹ýÂËÆ÷£¬ËüÊÇÒ»¸öCOM×é¼þ¡£ASP.NET·þÎñÔÚ×¢²áµ½IISµÄʱºò£¬¾Í»áÌí¼ÓÒ»¸öWin32µÄÀ©Õ¹¶¯Ì¬¿âaspnet_isapi.dll¡£²¢½«À©Õ¹¿ÉÒÔ´¦ÀíµÄÒ³ÃæÀ©Õ¹Ãû£¨ÈçASPX£©×¢²áµ½IISÀïÃæ¡£À©Õ¹Æô¶¯ºó£¬¾Í¸ù ......