November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
How big is your file, and what is exactly the error message (including stacktrace if any?)
Just to be sure, did you combine both settings (in IIS and in application layer)?
A shot in the dark, but maybe this in addition of your current settings
services.Configure<FormOptions>(x =>
{
x.ValueLengthLimit = 5000; // Limit on individual form values
x.MultipartBodyLengthLimit = 737280000; // Limit on form body size
x.MultipartHeadersLengthLimit = 737280000; // Limit on form header size
});
web.config
<configuration>
<system.web>
<compilation debug="true" />
<customErrors mode="Off" />
</system.web>
<system.webServer>
<handlers>
<remove name="aspNetCore"/>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\[NAME].exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" requestTimeout="02:00:00">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Local" />
</environmentVariables>
</aspNetCore>
<httpErrors errorMode="Detailed" />
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
<add name="X-UA-Compatible" value="IE=Edge" />
</customHeaders>
</httpProtocol>
<security>
<requestFiltering removeServerHeader="true">
<!-- IIS settings, specifies the maximum length of content in a request in bytes, default value is 30000000 -->
<requestLimits maxAllowedContentLength="4294967295" maxQueryString="32768" maxUrl="65536" />
</requestFiltering>
</security>
</system.webServer>
</configuration>
Startup.cs
services.Configure<UploadOptions>(options => options.FileSizeLimit = 4294967295L);
// If using Kestrel:
services.Configure<KestrelServerOptions>(options =>
{
options.Limits.MaxRequestBodySize = null;
options.Limits.KeepAliveTimeout = TimeSpan.FromMinutes(60);
options.Limits.RequestHeadersTimeout = TimeSpan.FromMinutes(60);
options.AllowSynchronousIO = true;
options.AddServerHeader = false;
});
// If using IIS:
services.Configure<IISServerOptions>(options =>
{
options.MaxRequestBodyBufferSize = int.MaxValue;
options.MaxRequestBodySize = null;
options.AllowSynchronousIO = true;
});
services.Configure<FormOptions>(options =>
{
options.ValueLengthLimit = int.MaxValue; // Limit on individual form values
options.MultipartBodyLengthLimit = long.MaxValue; // Limit on form body size
options.MultipartHeadersLengthLimit = int.MaxValue; // Limit on form header size
});
Startup.cs
app.UseWhen(context => context.Request.Path.StartsWithSegments(new PathString("/EPiServer"), StringComparison.InvariantCultureIgnoreCase), builder =>
{
var maxSizeFeature = builder.ServerFeatures.Get<IHttpMaxRequestBodySizeFeature>();
if (maxSizeFeature is null || maxSizeFeature.IsReadOnly)
{
return;
}
maxSizeFeature.MaxRequestBodySize = null;
});
We're in the process of changing from CMS 11 to CMS 12 and want to start on a fresh database.
Therefore we want to use the Import data feature, how ever, we get the error "timed out or max file size exceeded".
I've tried multiple things:
https://www.webdavsystem.com/server/documentation/large_files_iis_asp_net
web.config
Startup.cs
Startup.cs