0
shijo created
2 Answer(s)
-
0
This error seems to be based on the server you are hosting. Even if you solve the problem in your localhost, you'll need to configure
maxAllowedContentLength
on the server you are hosting the application.You can configure the Kestrel in
Program.cs
like:var builder = WebApplication.CreateBuilder(args); builder.WebHost.ConfigureKestrel(opt => opt.Limits.MaxRequestBodySize = long.MaxValue); // Add this line builder.Host .AddAppSettingsSecretsJson() .UseAutofac() .UseSerilog(); await builder.AddApplicationAsync<BServerBlazorModule>(); var app = builder.Build();
Also if you are running on IIS, update Web.config with:
<configuration> <system.web> <httpRuntime maxRequestLength="2147483647" /> </system.web> </configuration>
Entered numbers are in bytes, configure as you desire.
You can also check HTTP Error 413.1 - Request Entity Too Large - How to fix.
-
0