2012-01-16 76 views
0

我使用的文件上傳控制器,當我使用大小的文件上傳documents.Here說30MB我收到一個錯誤說如何上傳文件上傳通過控制大文件在asp.net

「加載頁面時,服務器連接重置。「

它甚至沒有去上傳按鈕點擊事件。

文件上傳控制器適用於較小文件的文件。

我是uinsg VS2005和C#。

回答

1

您必須使用httpruntime模塊,在web.config文件的配置節中使用MaxRequestLength屬性。

MaxRequestLength Property你可以使用這樣的代碼,

<configuration> 
     <system.web> 
     <httpRuntime maxRequestLength="31457280" executionTimeout="36000" /> 
     </system.web> 
    </configuration> 
0
add this to your web config 

    <configuration> 
     <system.web> 
     <httpRuntime maxRequestLength="31457280" /> 
     </system.web> 
    </configuration>