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 22 posts 163 karma points
    4 days ago
    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 74 posts 350 karma points
    3 days ago
    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 22 posts 163 karma points
    2 days ago
    Nate M
    1

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

Please Sign in or register to post replies

Write your reply to:

Draft