MaxRequestLengthを設定するとInternalServerErrorでIISが起動できない
でかいサイズの画像アップロードを作ってて、RequestLengthOverが出たのでWeb.configの設定を
POSTされるアップロードの上限を設定するには、Web.configのhttpRuntime要素のmaxrequestlength属性に値を設定する。 なにも設定しない場合は、デフォルトのサイズ上限値(4MB)が適用される。 たとえば5MBに制限する場合、以下のようになる。
<configuration> <system.web> <httpRuntime maxrequestlength="5120"> </system.web> </configuration>ASP.NET アップロードファイルサイズの上限
と変更したらなぜかInternalServerError(500.19)が出てサーバー自体が起動できない。
原因
これと同じ状況だった。
I need to increase the max upload size to above the 4 MB default. But when I add maxRequestLength into my webconfig file, I get an error
asp.net mvc - maxRequestLength and HTTP 500.19 - Internal Server Error - Stack Overflow
解決
2 try combining httpRuntime elements
<httpRuntime targetFramework="4.5" maxRequestLength="102400" />– Matt Tabor Apr 7 at 0:02
asp.net mvc - maxRequestLength and HTTP 500.19 - Internal Server Error - Stack Overflow
(;´д`) oh...