업로드 파일 용량 조절하기

web.config 에서 처리해준다.

간단한 내용이지만, 파일을 업로드 해주어야 한다.

기본 업로드 용량은 4MB 입니다.


1
2
3
4
5
6
7
8
9
10
11
12
13
<system.web>
    <!-- 1MB = 1024bytes -->
    <httpRuntime targetFramework="4.5" executionTimeout="3600" maxRequestLength="51200" />
</system.web>
<system.webServer>
    <security>
        <requestFiltering>
                <!-- maxAllowedContentLength 단위는 Kilobyte,  1M B = 1048576KB -->
                <!-- IIS에서 핸들링 -->
                <requestLimits maxAllowedContentLength="52428800" />
        </requestFiltering>
    </security>
</system.webServer>
cs



단위


1024bytes = 1KB, KB = Kilobyte


1024KB = 1MB, MB = Megabyte


1024MB = 1GB, GB = Gigabyte


1024GB = 1TB, TB = Terabyte


1024TB = 1PB, PB = Petabyte

'개발 > ASP.NET' 카테고리의 다른 글

[ASP.NET] 라우팅 Routing  (0) 2018.03.07
linq class 내에 포함된 속성만 array로 리턴  (0) 2018.01.24
gridView repeater 리스트 갯수 0개일때  (0) 2017.09.01
repeater 의 ItemDataBound  (0) 2017.09.01
?. 와 ??  (0) 2017.09.01

+ Recent posts