AJAXµ÷Óà ASP.net ±¾µØÎļþϵͳµÄ¹ÖÎÊÌâ
×î½ü¿ª·¢ExtÓ¦Óã¬Ê¹ÓÃajaxÇëÇóÊý¾Ýʱ£¬Óöµ½ÁËÇëÇóÊý¾ÝÒÔ·µ»Ø£¬µ«IEÀïÈ´ÎÞ·¨ÏÔʾµÄ¹ÖÎÊÌâ¡£
ʹÓÃHTTPWatch²é¿´£¬·¢ÏÖERROR_INTERNET_CONNECTION_RESET¡£
ʹÓÃFireFoxºÍgoogleä¯ÀÀÆ÷¶¼Ã»ÓÐÎÊÌ⣬ÍøÉϲéÕÒ˵ÍøÕ¾·ÅÔÚIISÉÏûÓÐÎÊÌ⣬ÊÔÑéºóÖ¤Ã÷ÓÐЧ¡£
µ«Í¬Ê¿ª·¢Óûú´ó²¿·Ö¶¼ÊÇXPϵͳ£¬Óв¿·Ö»¹ÊÇHOME°æ£¬Òò´Ë¸ÃÎÊÌâ±ØÐëÕÒµ½ÔÒò½â¾ö²ÅÐС£·¢ÏÖPOSTÇëÇó¸ÄΪGETÇëÇóÒ²²»»á³öÕâ¸öÎÊÌâ¡£
ÔÙ½øÒ»²½µÄ´óµ¨¼ÙÉ裬СÐÄÇóÖ¤¡£
ÔÚProcessRequest×îºóÔö¼Ó
context.Request.InputStream.ReadByte();
ºóÎÊÌâ³¹µ×½â¾ö
ÕâÖ¤Ã÷ÁËÎÒ֮ǰµÄ¼ÙÉè
Çé¿ö¿ÉÄÜÊÇÓÉÓÚʹÓÃÎļþ·½Ê½ÏµÍ³µÄÍøÕ¾£¬µ÷ÊÔÔËÐÐʱʹÓõÄÊÇASP.NET Development Server¶ø·ÇIIS£¬Òò´ËÔËÐлúÖÆÉÏÓëIIS´æÔÚ²»Í¬¡£
¼ì²é´úÂë·¢ÏÖ£¬´¦Àí¸ÃÇëÇóʱ£¬Ö»»ñÈ¡ÁËURLÉϵIJ¿·ÖÄÚÈÝ£¬²¢Î´¶ÔPOSTÄÚÈݲ¿·Ö½øÐлñÈ¡¡£
´Ëʱ¿ÉÄÜASP.NET Development Server²¢Î´´ÓIEÁ´½Ó¹ýÀ´µÄSocketÖжÁÈ¡Ê£Óಿ·Ö£¬¶ø³ÌÐò´¦ÀíÍê³Éºó·þÎñÆ÷¶Ë·¢Ëͽá¹ûÍê³Éºó¸ÃSocketÁ´½Ó¶Ïµô£¬¶øIEÈÏΪÊý¾Ý»¹Ã»Óз¢ËÍÍêÒò´Ë±¨ÁËERROR_INTERNET_CONNECTION_RESET´íÎó¡£
Ïà¹ØÎĵµ£º
ajax.dllÒѾÊǺÜÀϵĶ«Î÷ÁË£¬µ«ÊǽñÌìÎÒ²ÅÓõ½Ëü£¬ÏÖÔÚ°ÑËüµÄʹÓ÷½·¨¼Ç¼ÏÂÀ´¡£
1.ÔÚweb.configÖÐÅäÖÃajaxµÄ´¦Àí³ÌÐò¡£
<httpHandlers>
<add verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax" />
<httpHandlers>
2. ×¢²á´¦Àí³ÌÐòÀ࣬ajaxTestÊ ......
·½·¨Ò»£º
function document.onkeydown()
{
if(event.keyCode==13)
{
document.form1.all.Submit.click(); //ÕâÀïµÄsubmitÊÇ°´Å¥µÄID
}
}
·½·¨¶þ£º
......
Èç¹ûÄú´´½¨µÄÍøÒ³½«ÓÉʹÓò»Í¬ÓïÑÔµÄÓû§ÔĶÁ£¬Ôò±ØÐëΪÕâЩ¶ÁÕßÌṩÓÃËûÃÇ×Ô¼ºµÄÓïÑԲ鿴ÍøÒ³µÄ·½·¨¡£Ò»ÖÖ·½·¨ÊÇ·Ö±ðÓø÷ÓïÑÔÖØд´½¨Ò³Ã棬µ«ÕâÖÖ·½·¨¿ÉÄÜÐèÒª´óÁ¿¹¤×÷Á¿¡¢ÈÝÒ׳ö´í²¢ÇÒÔÚ¸ü¸ÄÔʼҳʱºÜÄÑά»¤¡£ASP.NET ΪÄúÌṩÁËÒ»ÖÖ·½·¨£¬Ê¹ÓÃÕâÖÖ·½·¨´´½¨µÄÒ³¿ÉÒÔ¸ù¾Ýä¯ÀÀÆ÷µÄÊ×Ñ¡ÓïÑÔÉèÖûòÓû§ÏÔʽѡÔñµÄÓïÑÔ»ñÈ¡ÄÚ ......
Ïò»ùÓÚASP.NET MVCµÄWeb³ÌÐò·¢ËÍÇëÇóÊ×ÏÈ´«µÝÒ»¸ö UrlRoutingModule ¶ÔÏó£¬ÕâÊÇÒ»¸öHTTPÄ£¿é¡£Õâ¸öÄ£¿é½âÎöÇëÇó²¢Ö´ÐзÓÉÑ¡Ôñ¡£ UrlRoutingModule ¶ÔÏóÑ¡ÔñµÚÒ»¸öÆ¥Å䵱ǰÇëÇóµÄ·ÓɶÔÏó¡£(·ÓɶÔÏóÊÇʵÏÖ RouteBase µÄÀ࣬¶øÇÒͨ³£ÊÇ Route ÀàµÄÒ»¸öʵÀý¡£) Èç¹ûûÓÐÈκηÓÉÆ¥Å䣬 UrlRoutingModule ¶ÔÏó¾Íɶ¶¼²»×ö£¬ÈÃÇ ......
ÎÒÃÇÖªµÀÒ»¸öÍøÕ¾ÔÚ·ÃÎÊÁ¿¾Þ´óµÄʱºò£¬Èç¹ûÄÜʹÓûº´æ¼¼Êõ£¬¿ÉÒÔÃ÷ÏÔ½µµÍÍøÕ¾µÄ·ÃÎʸºµ££¬ËùÒÔ·Ï»°²»¶à˵£¬ÎÒÃÇÀ´¿´Ò»ÏÂÔÚASP.NETÖÐÈçºÎÄÜʵÏÖ»º´æ¡£
Ê×ÏÈÓ¦¸ÃÇå³þµÄÊÇ£¬ÔÚASP.NETÖУ¬ÓÐÁ½À໺´æ¿ÉÒÔʹÓ㬵ÚÒ»ÀàÊÇÊä³ö»º´æ£¬µÚ¶þÀàÊÇÊý¾Ý»º´æ¡£
Êä³ö»º´æµÄͨË×½âÊ;ÍÊÇ£¬¾ÍÊÇÎÒÃÇ°Ñij¸ö±»·ÃÎʵÄÒ³ÃæÔÚÓû§·ÃÎÊʱÔÝʱÉú³É ......