Skip to content

Commit 0a042b2

Browse files
committed
IIS can only handle ~4GB uploads. No good documentation, but found a couple of places documenting this. E.g. https://newbedev.com/how-to-set-the-maxallowedcontentlength-to-500mb-while-running-on-iis7
1 parent e960ca6 commit 0a042b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Umbraco.Web.Common/Security/ConfigureIISServerOptions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ public class ConfigureIISServerOptions : IConfigureOptions<IISServerOptions>
1212
public void Configure(IISServerOptions options)
1313
{
1414
// convert from KB to bytes
15-
options.MaxRequestBodySize = _runtimeSettings.Value.MaxRequestLength.HasValue ? _runtimeSettings.Value.MaxRequestLength.Value * 1024 : long.MaxValue;
15+
options.MaxRequestBodySize = _runtimeSettings.Value.MaxRequestLength.HasValue ? _runtimeSettings.Value.MaxRequestLength.Value * 1024 : uint.MaxValue; // ~4GB is the max supported value for IIS and IIS express.
16+
//options.IisMaxRequestSizeLimit
1617
}
1718
}
1819
}

0 commit comments

Comments
 (0)