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

ĬÈÏÖ»ÄÜÉÏ´«2M¸½¼þ, ÈçºÎ·Å¿ªÏÞÖÆ? (asp.net C#)

 
¶ÔÓÚasp.net,ĬÈÏÖ»ÔÊÐíÉÏ´«2MÎļþ,Ôö¼ÓÈçÏÂÅäÖÃ,Ò»°ã¿ÉÒÔ×Ô¶¨Òå×î´óÎļþ´óС.
<httpRuntime executionTimeout="300" maxRequestLength="40960" useFullyQualifiedRedirectUrl="false"/>
ÎÒÃÇÔÚÉÏ´«´óÎļþʱ¶¼Óöµ½¹ýÕâÑù»òÄÇÑùµÄÎÊÌâ¡£ÉèÖúܴóµÄmaxRequestLengthÖµ²¢²»ÄÜÍêÈ«½â¾öÎÊÌ⣬ÒòΪASP.NET»áblockÖ±µ½°Ñ
Õû¸öÎļþÔØÈëÄÚ´æºó£¬ÔÙ¼ÓÒÔ´¦Àí¡£Êµ¼ÊÉÏ£¬Èç¹ûÎļþºÜ´óµÄ»°£¬ÎÒÃǾ­³£»á¼ûµ½Internet ExplorerÏÔʾ "The page
cannot be displayed - Cannot find server or DNS
Error"£¬ºÃÏñÊÇÔõôҲcatch²»ÁËÕâ¸ö´íÎó¡£ÎªÊ²Ã´£¿ÒòΪÕâÊǸöclient side´íÎó£¬server
side¶ËµÄApplication_ErrorÊÇ´¦Àí²»µ½µÄ£¬¿ÉÒԲο¼Õâ¸öÌû×ÓÑо¿Ò»Ï²úÉúÕâ¸ö´íÎóµÄ»úÀí¡£
handling server error when upload file too large
½â¾öµÄ·½·¨ÊÇÀûÓÃÒþº¬µÄHttpWorkerRequest£¬ÓÃËüµÄGetPreloadedEntityBody ºÍ
ReadEntityBody·½·¨´ÓIISΪASP.NET½¨Á¢µÄpipeÀï·Ö¿é¶ÁÈ¡Êý¾Ý,Chris
HynesΪÎÒÃÇÌṩÁËÕâÑùµÄÒ»¸ö·½°¸(ÓÃHttpModule)£¬¸Ã·½°¸³ýÁËÔÊÐíÄãÉÏ´«´óÎļþÍ⣬»¹ÄÜʵʱÏÔʾÉÏ´«½ø¶È¡£
   IServiceProvider provider = (IServiceProvider) HttpContext.Current;
   HttpWorkerRequest wr = (HttpWorkerRequest) provider.GetService(typeof(HttpWorkerRequest));
   byte[] bs = wr.GetPreloadedEntityBody();
   ....
   if (!wr.IsEntireEntityBodyIsPreloaded())
   {
         int n = 1024;
         byte[] bs2 = new byte[n];
         while (wr.ReadEntityBody(bs2,n) >0)
        {
              .....
         }
   }
¸ÐлChris HynesÌṩÁËͨ¹ýHttpModule(Krystalware.HttpUploadManager)ʵÏÖ ASP.NET´óÎļþÉÏ´«µÄ´úÂ룺
(ÆäÖÐHttpUploadSpike.rarÊÇ ASP.NET´óÎļþÉÏ´«¿ªÔ´°æ±¾[ÓÐһЩСBUG£¬Ð޸ķ½·¨¼ûÏÂÎÄ]
SlickUpload-2.5.2.rarÊÇ ASP.NET´óÎļþÉÏ´«×îеķǿªÔ´°æ±¾)
ʹÓÃChris HynesÌṩµÄ´úÂë


Ïà¹ØÎĵµ£º

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


      ״̬¹ÜÀíÊÇÄú¶Ôͬһҳ»ò²»Í¬Ò³µÄ¶à¸öÇëÇóά»¤×´Ì¬ºÍÒ³ÐÅÏ¢µÄ¹ý³Ì¡£ÓëËùÓлùÓÚ HTTP µÄ¼¼ÊõÒ»Ñù£¬Web ´°ÌåÒ³ÊÇÎÞ״̬µÄ£¬ÕâÒâζ×ÅËüÃDz»×Ô¶¯Ö¸Ê¾ÐòÁÐÖеÄÇëÇóÊÇ·ñÈ«²¿À´×ÔÏàͬµÄ¿Í»§¶Ë£¬»òÕßµ¥¸öä¯ÀÀÆ÷ʵÀýÊÇ·ñÒ»Ö±Ôڲ鿴ҳ»òÕ¾µã¡£´ËÍ⣬µ½·þÎñÆ÷µÄÿһÍù·µ¹ý³Ì¶¼½«Ïú»Ù²¢ÖØд´½¨Ò³£»Òò´ ......

ASP.NET


      Ó¦ÓóÌÐò״̬Êǿɹ© ASP.NET Ó¦ÓóÌÐòÖеÄËùÓÐÀàʹÓõÄÊý¾Ý´¢´æ¿â¡£Ëü´æ´¢ÔÚ·þÎñÆ÷µÄÄÚ´æÖУ¬Òò´ËÓëÔÚÊý¾Ý¿âÖд洢ºÍ¼ìË÷ÐÅÏ¢Ïà±È£¬ËüµÄÖ´ÐÐËٶȸü¿ì¡£ÓëÌض¨ÓÚµ¥¸öÓû§»á»°µÄ»á»°×´Ì¬²»Í¬£¬Ó¦ÓóÌÐò״̬ӦÓÃÓÚËùÓеÄÓû§ºÍ»á»°¡£Òò´Ë£¬Ó¦ÓóÌÐò״̬ÓÃÓÚ´æ´¢ÄÇЩÊýÁ¿½ÏÉÙ¡¢²»ËæÓû§µÄ±ä»¯ ......

ASP.NET 2.0 ʵÏÖα¾²Ì¬ÍøÒ³·½·¨

 ¿´ÁËÄÇô¶à£¬»¹ÊÇÇ××Ô¶¯ÊÖʵ¼ùÏÂÓÐЧ¹û¡£
ÒýÓà °Ù¶È ÑîÔÆ·ÉaiÉú»î
ASP.NET 2.0 ʵÏÖα¾²Ì¬ÍøÒ³·½·¨
·½·¨Ò»£ºÀûÓÃHttphandlerʵÏÖURLÖØд£¨Î±URL¼°Î±¾²Ì¬£©
ÎÒÃÇÓÐʱºò»á¼ûµ½ÕâÑùµÄµØÖ·£º“http://www.huoho.com/show-12-34.html”£¬Äã»òÐíÈÏΪÔÚÕ¾µã·þÎñÆ÷¸ùĿ¼“/”Ï´æÔÚÃûΪ“show- ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ