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

ASP.NET³ÌÐòÖÐ Å׳ö"Thread was being aborted. "Òì³£

½ñÌìͻȻÓöµ½Õâ¸öÎÊÌâÁË£¡²»¹ýË¢ÐÂÒ³Ãæºó´íÎó¾ÍûÓУ¡ ¶øÇÒ֮ǰҲûÓÐÕâ¸ö´íÎóŶ£¡ ... ²»¹ýÎÒ»¹ÊÇÈ¥GoogleÁËһϴ𰸣¡
Thread was being aborted :ÖÐÎÄÒâ˼ Ï̱߳»ÖÕÖ¹
ÒýÓõØÖ·£ºhttp://support.microsoft.com/default.aspx/kb/312629/EN-US/?p=1
Ô­Òò£º
ÄǸö 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£© µÄÍÆÒÆ false Ϊ endResponse ²ÎÊýѹÖÆÄÚ²¿µç»° Response.End¡£ÀýÈ磺
Response.Redirect£¨“nextpage.aspx”£¬false£©;

Èç¹ûÄúʹÓô˽â¾ö·½°¸£¬ÏÂÃæµÄ´úÂë Response.Redirect ±»Ö´ÐС£
ΪÁË Server.Transfer·½·¨£¬Ê¹Óà ʹÓÃServer.Execute ·½·¨À´´úÌæ¡£
Áí:¾¡Á¿²»Òª°ÑResponse.Redirect("targetUrl");Óï¾äдÔÚtryÀïÃæÁË£¡ ʹÓÃResponse.Redirect("targetUrl",false);


Ïà¹ØÎĵµ£º

ASP.NET MVC ÈëÃÅ6¡¢TempData

ASP.NET
MVCµÄTempDataÓÃÓÚ´«ÊäһЩÁÙʱµÄÊý¾Ý£¬ÀýÈçÔÚ¸÷¸ö¿ØÖÆÆ÷Action¼ä´«µÝÁÙʱµÄÊý¾Ý»òÕ߸øView´«µÝһЩÁÙʱµÄÊý¾Ý£¬ÏàÐÅ´ó¼Ò¶¼¿´¹ý“ÔÚ
ASP.NETÒ³Ãæ¼ä´«ÖµµÄ·½·¨ÓÐÄļ¸ÖÖ”Õâ¸öÃæÊÔÌ⣬ÔÚASP.NET
MVCÖÐTempDataµÄ¾ÍÊÇÆäÖеÄÒ»ÖÖ´«Öµ·½·¨¡£TempDataĬÈÏÊÇʹÓÃSessionÀ´´æ´¢ÁÙʱÊý¾ÝµÄ£¬TempDataÖдæ·ÅµÄ ......

Asp.net¼Ü¹¹»Ø¹Ë£¨×ªÔØ£©


ASP.NETÊÇÓÉ΢ÈíÔÚ.NET FrameworkÖÐËùÌṩµÄ£¬¿ª·¢WebÓ¦ÓóÌÐòµÄÀà¿â£¬·â×°ÔÚSystem.Web.dllÎļþÖУ¬ÏÔ¶³öSystem.WebÃüÃû¿Õ¼ä£¬²¢ÌṩASP.NETÍøÒ³´¦Àí¡¢À©³äÒÔ¼°HTTPͨµÀµÄÓ¦ÓóÌÐòÓëͨÐÅ´¦ÀíµÈ¹¤×÷£¬ÒÔ¼°Web
ServiceµÄ»ù´¡¼Ü¹¹¡£ASP.NETÊÇASP¼¼ÊõµÄºó¼ÌÕߣ¬µ«ËüµÄ·¢Õ¹ÐÔÒª±ÈASP¼¼ÊõҪǿ´óÐí¶à¡£
ASP.NET¿ÉÒÔÔËÐÐÔÚ°² ......

ASP.NETÖи߼¶³ÌÐòÔ± ÃæÊÔÌâ


×÷Õß: Íõ¾°  À´Ô´: ²©¿ÍÔ°  ·¢²¼Ê±¼ä: 2010-03-08 14:18  ÔĶÁ: 239 ´Î  Ô­ÎÄÁ´½Ó   [ÊÕ²Ø]  
¡¡¡¡×î½üÔÚÕÐƸеÄÍŶӳÉÔ±ÖУ¬×Ô¼ºÏë³öÁËһЩÎÊÌâ¡£ÏÈÁгöÀ´£¬Óлú»á²»¶Ï¸üаɡ£
¡¡¡¡µÚÒ»²¿·Ö£º
¡¡¡¡»¥Ïà½éÉܼ°Á˽â
¡¡¡¡1.Çë½éÉÜÒ»ÏÂÄã ......

ѧϰASP.NET + MVC£¨ËÄ£©

Ò».ÕªÒª
¡¡¡¡±¾ÎĽ²½âÔÚActionÖÐÏòView´«µÝModelµÄ¼¸ÖÖ·½Ê½.ÒÔ¼°View»ñÈ¡ModelÒÔºóÈçºÎ±àдÏÔʾÂß¼­.»¹ÏêϸµÄ½éÉÜÁËASP.NET MVC¿ò¼ÜÌṩµÄHtml HelperÀàµÄʹÓü°ÈçºÎΪHtml HelperÀàÌí¼Ó×Ô¶¨ÒåÀ©Õ¹·½·¨.
¡¡¡¡¶þ.³ÐÉÏÆôÏÂ
¡¡¡¡ÉÏһƪÎÄÕÂÖÐÎÒÃÇѧϰÁËController´¦ÀíÒ»´ÎÇëÇóµÄÈ«¹ý³Ì.ÔÚControllerµÄActionÖÐ, »á´«µÝÊý¾Ý¸ ......

ѧϰASP.NET + MVC£¨¶þ£©

Ò».ÕªÒª
¡¡¡¡±¾ÆªÎÄÕ´ӻù´¡µ½ÉîÈëµÄ½éÉÜASP.NET MVCÖеÄRouting×é¼þ. Routing·­Òë¹ýÀ´ÊÇ"·ÓÉÑ¡Ôñ", ¸ºÔðASP.NET MVCµÄµÚÒ»¸ö¹¤×÷:ʶ±ðURL, ½«Ò»¸öUrlÇëÇó"·ÓÉ"¸øController. ÓÉÓÚ½ñÌìÏÂÎç²Î¼ÓÁ˲©¿ÍÔ°±±¾©¾ãÀÖ²¿µÄ¾Û»á, ËùÒÔ±¾ÆªÎÄÕµÄÍ깤ʱ¼äÍíÁ˵ã, »¹ºÃÒ²ÊÇÔÚ½ñÌì·¢±í, ×ÜËã¶ÒÏÖÁË"ÿÈÕһƪ"µÄ³Ðŵ. ²»¾Ã¶¡Ñ§¾Í»á·¢ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ