반응형
IIS7에서 실행하는 동안 maxAllowedContentLength를 500MB로 설정하는 방법은 무엇입니까?
maxAllowedContentLength를 다음으로 변경했습니다.
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="5024000000" />
</requestFiltering>
</security>
내 web.config에서 IIS7에서 실행할 때 다음 오류가 발생합니다.
'maxAllowedContentLength'속성이 잘못되었습니다. 유효한 부호없는 정수가 아닙니다.
하지만 VS 서버에서 실행하면 오류없이 정상적으로 실행됩니다.
IIS7에서이 문제없이 500MB 크기의 파일 업로드를 허용하도록 웹 사이트를 구성하는 방법은 무엇입니까?
에있어서 MSDN하는 maxAllowedContentLength
형식이 uint
, 그 최대치는 4,294,967,295 바이트 = 3.99 기가 바이트이고
따라서 잘 작동합니다.
참조 제한 문서를 요청 . IIS는 적절한 섹션이 전혀 구성되지 않은 경우 이러한 오류 중 하나를 반환합니까?
참고 항목 : 최대 요청 길이 초과
.Net의 요청 제한은 두 가지 속성에서 함께 구성 할 수 있습니다.
먼저
Web.Config/system.web/httpRuntime/maxRequestLength
- 측정 단위 : 킬로바이트
- 기본값 4096KB (4MB)
- 맥스. 값 2147483647KB (2TB)
둘째
Web.Config/system.webServer/security/requestFiltering/requestLimits/maxAllowedContentLength
(바이트)- 측정 단위 : 바이트
- 기본값 30000000 바이트 (28.6MB)
- 맥스. 값 4294967295 바이트 (4GB)
참조 : http://www.whatsabyte.com/P1/byteconverter.htm https://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits
예:
<location path="upl">
<system.web>
<!--The default size is 4096 kilobytes (4 MB). MaxValue is 2147483647 KB (2 TB)-->
<!-- 100 MB in kilobytes -->
<httpRuntime maxRequestLength="102400" />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<!--The default size is 30000000 bytes (28.6 MB). MaxValue is 4294967295 bytes (4 GB)-->
<!-- 100 MB in bytes -->
<requestLimits maxAllowedContentLength="104857600" />
</requestFiltering>
</security>
</system.webServer>
</location>
반응형
'development' 카테고리의 다른 글
gulp에서 사용 가능한 작업 목록을 얻는 방법 (0) | 2020.09.20 |
---|---|
데이터 기반 프로그래밍이란 무엇입니까? (0) | 2020.09.20 |
문자열 연결이 예상대로 작동하지 않음 (0) | 2020.09.20 |
CocoaPods-특정 포드 버전 사용 (0) | 2020.09.20 |
Angular를 사용하여 전 세계적으로 401s 처리 (0) | 2020.09.20 |