Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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Ó¦ÓóÌÐò

 ASP.NET defines an application as the sum of all files, pages, handlers, modules, and executable code that can be invoked or run in the scope of a given virtual directory (and its subdirectories) on a Web application server. For example, an "order" application might be published in the "/order ......

ʲôÊÇASP.NET

 What is ASP.NET
ASP.NET is a unified Web development model that includes the services necessary for you to build enterprise-class Web applications with a minimum of coding. ASP.NET is part of the .NET Framework, and when coding ASP.NET applications you have access to classes in the .NET Frame ......

asp.net mvc json ÐòÁл¯À©Õ¹·½·¨

¼Ç¼һ¸öС·½·¨£¬ÈÃÈκζÔÏó¶¼ÊµÏÖjsonÐòÁкúµÄÀ©Õ¹·½·¨:
using System.Web.Script.Serialization;
...
 //
public static string ToJSON(this Object obj) {
            return new JavaScriptSerializer().Serialize(obj);
 }
... ......

ASP.netÖеÄAJAXѧϰ¼Ç¼

 ½ñÌìÎÒÖ÷ҪѧϰÁËUpdateModeÊôÐÔ¼°Ê¹ÓÃUpdateTriggers£¬°ÑÊéÖÐËù½ÌÊÚµÄÄÚÈÝÓöà¸öÀý×Óʵ¼ùÁËһϣ¬È·ÊµÃ÷°×ÁËÐí¶à¡£
  UpdateMode
      Ê×ÏÈÔÚÉÏһƪҲÌáµ½¹ýÕâÑùÒ»¸öÀíÂÛ£ºÔÚ̸ÂÛUpdatePanel¿Ø¼þµÄË¢ÐÂʱ£¬µ±UpdatePanel¿Ø¼þÖеÄ×ӿؼþ´¥·¢Async-Postback¶¯×÷ʱ£¬Ë¢ÐµÄÇøÓòÊ ......

ASP.NET


      ASP.NET ÅäÖÃÎļþ¹¦ÄÜÔÊÐíÄú´æ´¢¼òµ¥£¨±êÁ¿£©Öµ¡¢¼¯ºÏºÍÆäËû¸´ÔÓÀàÐÍ£¬ÒÔ¼°Óû§¶¨ÒåµÄÀàÐÍ¡£
 
1¡¢ÊôÐÔ¶¨ÒåÐÅÏ¢
ÔÚÅäÖÃÎļþÖж¨ÒåÊôÐÔʱ£¬Ó¦Ö¸¶¨½«ÓÃÓÚÒýÓøÃÊôÐÔµÄÃû³Æ¡£ÀýÈ磬Èç¹ûÒª´æ´¢ÓÊÕþ±àÂ룬Ôò¿ÉÒÔ½«ÊôÐÔÃüÃûΪ PostalCode£¬È»ºó¿ÉÒÔ»ñÈ¡ÊôÐÔÖµ²¢½«ÆäÉèÖÃΪ Profile.Pos ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ