2011-07-31 6 views

답변

2

예, 그것은 그냥 <system.web> 섹션에서 web.config에서 그것을 설정 web.config

에서 설정할 수 있습니다. 아래의 예에서 나는 maximum length

<httpRuntime maxRequestLength="2097152" executionTimeout="600" /> 

2GBmaxRequestLengthKB's에 설정되고이 2기가바이트 (2079152 KB's)까지 설정할 수 있습니다, 설정하고있다. 그러나 기본 파일 크기 제한은 (4MB)입니다.

3

이 같은 코드에서의 Web.config의 maxRequestLength 속성을 설정할 수 있습니다 :

Configuration webConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~"); 
var section = (System.Web.Configuration.SystemWebSectionGroup)webConfig.GetSectionGroup("system.web"); 
section.HttpRuntime.MaxRequestLength = 10 * 1024; // 10 MB 
webConfig.Save(); 

우리는 우리의 Rock RMS 콘텐츠 관리 시스템에 this exact thing을한다.