EXT FileUploadField file upload failed

       

EXT upload the file successfully, once uploaded slightly larger files (10M) will fail.

   FileUploadField1.PostedFile.SaveAs(FullPath);



Solution:
Set web.config

<configuration>
    <system.web>
      <httpRuntime  maxRequestLength="1048576" executionTimeout="720" />
   </system.web>
</configuration>

 

      <!--
      httpRuntime asp.net HTTP runtime configuration is provided, in order to determine how to handle requests for asp.net application.
      executionTimeout: represents the maximum time that can perform the requested limit, in seconds
      maxRequestLength: indication ASP.NET supports a maximum file upload size. This limitation can be used to prevent denial of service attacks because a large number of users to transfer files to the server caused. The size specified in KB. The default value is 4096 KB (4 MB).
      useFullyQualifiedRedirectUrl: indication indicates whether the client redirector fully defined (using "http: // server / path" format, which is necessary for some mobile control), indicating whether or instead sent to the client relative to redirect end. If True, not all fully qualified are automatically redirected into a fully qualified format. false is the default option.
      minFreeThreads: indicates that the specified minimum number of free threads to allow execution of new requests. ASP.NET threads to require additional processing to fulfill the request which specifies the number of threads left free. The default value is 8.
      minLocalRequestFreeThreads: ASP.NET expressed kept allowed to perform the minimum number of free threads of new local requests. The number of the thread is passed from the local host to request reserved in case certain sub-request the request issued to the local host during its processing. This avoids a possible deadlock due to the recursive re-enter the Web server caused.
      appRequestQueueLimit: indicates the maximum number of ASP.NET application for queued requests. When there is not enough free threads to process the request, queue the request. When setting the queue exceeds the specified limit, by "503 - Server too busy" error message reject incoming requests.
      enableVersionHeader: Indicates whether the specified version of ASP.NET should output the header. Microsoft Visual Studio 2005 use this property to determine the ASP.NET version currently being used. For a production environment, the property is not required and can be disabled.

-->

      <httpRuntime executionTimeout="720" 
                   maxRequestLength="40960" 
                   useFullyQualifiedRedirectUrl="false"
                   minFreeThreads="8" 
                   minLocalRequestFreeThreads="4" 
                   appRequestQueueLimit="100" 
                   enableVersionHeader="false"/>

 

Guess you like

Origin www.cnblogs.com/BinBinGo/p/11003518.html