IISÖÐASP.netµ÷ÊÔ³öÏÖ½ø³Ì±»´ò¶ÏµÄµ÷Õû
·ÖÀà: ר¼ÒBlog ÍƼöÕߣºadmin| ä¯ÀÀÁ¿£º489 views| 1 ¸öÆÀÂÛ
Èç¹ûÎÒÃÇÓÃIISËÞÖ÷ASP.net£¬µ¥²½µ÷ÊÔʱ£¬»áÓпÉÄÜÏÂÃæµÄÒì³£±¨³öÀ´£º
—————————
Microsoft Visual Studio
—————————
The web server process that was being debugged has been terminated by Internet Information Services (IIS). This can be avoided by configuring Application Pool ping settings in IIS. See help for further details.
—————————
È·¶¨ °ïÖú
—————————
ÕâÀïµÄ˵µÄºÜÃ÷°×£¬IISĬÈÏ»á90Ã붨ʱPing×Ô¼ºµÄ½ø³Ì£¬¼à¿ØÕâ¸ö½ø³ÌÊÇ·ñÕý³£¹¤×÷¡£Èç¹ûÕâ¸öping´ò¿ªµÄ£¬µ÷ÊÔASP.net ¿ÉÄܾͻᱻÕâ¸ö¸ÉÈÅ¡£½â¾öµÄ·½·¨¾ÍÊǽûÓõô¶¨Ê±Ping£¬»òÕß°ÑÕâ¸öPingµÄʱ¼äÑӳٺܳ¤¡£
Õâ¸öµÄÉèÖõط½ÈçÏ£¬ÕâÀïÎÒÊÇÒÔIIS7ΪÀý£º
Internet ÐÅÏ¢·þÎñ(IIS)¹ÜÀíÆ÷ ÖÐÎÒÃÇ´ò¿ªÓ¦ÓóÌÐò³Ø¡£Ñ¡ÔñÎÒÃÇÕ¾µãʹÓõÄÄǸöÓ¦ÓóÌÐò³Ø¡£È»ºóÔÙÓÒ²àµã»÷“¸ß¼¶ÉèÖÃ…”,»á³öÏÖÏÂÃæµÄͼ£º
ÎÒÃÇÔÚÕâÀï¿ÉÒÔ°ÑÆôÓà PingÉèÖóÉfalse£¬»òÕß°Ñ“Ping×î´óÏìӦʱ¼ä£¨Ã룩”ÉèÖóÉÒ»¸ö±È90¸ü´óµÄÖµ¼´¿É¡£
±¾ÎÄÀ´×ÔCSDN²©¿Íר¼Ò òåòå¿¡ È«ÎÄÇë²é¿´IISÖÐASP.netµ÷ÊÔ³öÏÖ½ø³Ì±»´ò¶ÏµÄµ÷Õû
Ïà¹ØÎĵµ£º
Ò»¡¢ÈÏʶWeb.configÎļþ
Web.config ÎļþÊÇÒ»¸öXMLÎı¾Îļþ£¬ËüÓÃÀ´´¢´æ ASP.NET Web Ó¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢£¨Èç×î³£ÓõÄÉèÖÃASP.NET Web Ó¦ÓóÌÐòµÄÉí·ÝÑéÖ¤·½Ê½£©£¬Ëü¿ÉÒÔ³öÏÖÔÚÓ¦ÓóÌÐòµÄÿһ¸öĿ¼ÖС£µ±Äãͨ¹ý.NETн¨Ò»¸öWebÓ¦ÓóÌÐòºó£¬Ä¬ÈÏÇé¿öÏ»áÔÚ¸ùĿ¼×Ô¶¯´´½¨Ò»¸öĬÈ쵀 Web.configÎļþ£¬°üÀ¨Ä¬ÈϵÄÅäÖÃÉèÖ㬠......
ASP.NET 4µÄWeb Formsµ±ÖУ¬×îÁîÈ˼¤É͵ģ¬ÔòĪ¹ýÓÚÊÇURL Routing»úÖƵÄÈ«ÃæÖ§³Ö¡£¹ýÈ¥ÔÚASP.NET 3.5 SP1µ±ÖУ¬Web Forms»ò¶à»òÉپͿªÊ¼Ö§³ÖURL Routing»úÖÆ£¬ËüÈÃÎÒÃÇÔÚÍøÖ·µÄ³ÊÏÖÒÔ¼°Ê¹ÓÃÉϸü¼ÓµÄÓе¯ÐÔ¡£
¹ýÈ¥ÎÒÃÇÔÚASP.NETµ±ÖУ¬Ï°¹ßÓÚµ×ÏÂÕâÑùµÄÍøÖ·³ÊÏÖ·½Ê½£º
http://myWebSite/EditProduct.aspx?Id=1
µ«×î½ü¼¸ÄêR ......
1 »ñÈ¡´íÎóÐÅÏ¢²¢µ½Ö¸¶¨Ò³Ã治ҪʹÓÃResponse.Redirect,¶øÓ¦¸ÃʹÓÃServer.Transfer
e.g
// in global.asax
protected void Application_Error(Object sender, EventArgs e) {
if (Server.GetLastError() is HttpUnhandledException)
Server.Transfer("MyErrorPage.aspx");
//ÆäÓàµÄ·ÇHttpUnhandledExceptio ......
Request¶ÔÏó¹¦ÄÜÊÇ´Ó¿Í»§¶ËµÃµ½Êý¾Ý£¬³£ÓõÄÈýÖÖÈ¡µÃÊý¾ÝµÄ·½·¨ÊÇ£ºRequest.Form¡¢Request.QueryString£¬Request¡£ÆäµÚÈýÖÖÊÇÇ°Á½ÖÖµÄÒ»¸öËõд£¬¿ÉÒÔÈ¡´úÇ°Á½ÖÖÇé¿ö¡£¶øÇ°Á½ÖÖÖ÷Òª¶ÔÓ¦µÄFormÌύʱµÄÁ½ÖÖ²»Í¬µÄÌá½»·½·¨£º·Ö±ðÊÇPost·½·¨ºÍGet·½·¨¡£
Request ¶ÔÏóµÄÊôÐԺͷ½·¨± ......
×î½ü×ö±£´æÔ¶³ÌͼƬʱºò£¬¾ÍÔÚ±£´æµÄʱºò×ÜÊdzöÕâ¸ö´íÎó£¬ÍøÉÏgoogleÁËһȦ£¬¶¼ÊÇÔÙ˵ȨÏÞÎÊÌ⣬ÎÊÌâÎÒÊÇÓÃUÅÌ£¬ÄÄÀïÓÐʲôȨÏÞÎÊÌâ¡£
×îºóÎÞÒâÖз¢ÏÖÁËÎÊÌâËùÔÚ
±£´æµÄʱºò²»ÄÜÓÃÏà¶Ô·¾¶£¬Ò»¶¨ÒªÓÃserver.mappath()´¦Àíһϱ£´æµÄ·¾¶¡£¡£¡£°¦£¡ ......