Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nate M 24 posts 165 karma points
    Jan 27, 2025 @ 17:50
    Nate M
    0

    How can I fix server erros in my deployed website?

    I deployed my website to a web server. Everything was working fine after deployment, but now I'm getting server errors.

    Server error: Contact administrator, see log for full details. undefined
    

    In the backoffice when I checked the logs I saw a bunch of errors like this one:

        System.IO.InvalidDataException: Multipart body length limit -339607552 exceeded.
       at Microsoft.AspNetCore.WebUtilities.MultipartReaderStream.UpdatePosition(Int32 read)
       at Microsoft.AspNetCore.WebUtilities.MultipartReaderStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)
       at System.IO.StreamReader.ReadBufferAsync(CancellationToken cancellationToken)
       at System.IO.StreamReader.ReadToEndAsyncInternal(CancellationToken cancellationToken)
       at Microsoft.AspNetCore.WebUtilities.MultipartSectionStreamExtensions.ReadAsStringAsync(MultipartSection section, CancellationToken cancellationToken)
       at Microsoft.AspNetCore.Http.Features.FormFeature.InnerReadFormAsync(CancellationToken cancellationToken)
       at Microsoft.AspNetCore.Http.Features.FormFeature.ReadForm()
       at Umbraco.Extensions.HttpRequestExtensions.GetUfprt(HttpRequest request)
       at Umbraco.Cms.Web.Website.Routing.EagerMatcherPolicy.ApplyAsync(HttpContext httpContext, CandidateSet candidates)
       at Microsoft.AspNetCore.Routing.Matching.DfaMatcher.SelectEndpointWithPoliciesAsync(HttpContext httpContext, IEndpointSelectorPolicy[] policies, CandidateSet candidateSet)
       at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<Invoke>g__AwaitMatch|10_1(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task matchTask)
       at StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in C:\projects\dotnet\src\MiniProfiler.AspNetCore\MiniProfilerMiddleware.cs:line 112
       at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
       at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
       at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext()
    --- End of stack trace from previous location ---
       at Umbraco.Cms.Web.Common.Middleware.PreviewAuthenticationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
       at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext()
    --- End of stack trace from previous location ---
       at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestLoggingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
       at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext()
    --- End of stack trace from previous location ---
       at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)
       at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContextOfT`1.ProcessRequestAsync()
    

    I don't know what's going on. Can someone please help?

  • Afreed 86 posts 383 karma points
    Jan 28, 2025 @ 03:42
    Afreed
    100

    If your file exceeds the server request limit then this could happen

    <configuration>
      <system.webServer>
        <security>
          <requestFiltering>
            <requestLimits maxAllowedContentLength="524288000" /> <!-- 500 MB(just for testing) -->
          </requestFiltering>
        </security>
      </system.webServer>
    </configuration>
    

    try adding this to your web.config

  • Nate M 24 posts 165 karma points
    Jan 28, 2025 @ 21:24
    Nate M
    1

    Thank you, it looks like this worked. I appreciate your help!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies