Open Closed

AmbiguousMatchException after upgarding to 5.0.0 when calling any sub-path #2383


User avatar
0
BassaSolutions created
  • ABP Framework version: v5.0.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered Identity Server: yes
  • Exception message and stack trace:
   Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware: 10:04:36,029 ERROR Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware - An unhandled exception has occurred while executing the request.
Microsoft.AspNetCore.Routing.Matching.AmbiguousMatchException: The request matched multiple endpoints. Matches: 

/_Host
/_Host
   at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ReportAmbiguity(CandidateState[] candidateState)
   at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ProcessFinalCandidates(HttpContext httpContext, CandidateState[] candidateState)
   at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.Select(HttpContext httpContext, CandidateState[] candidateState)
   at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.SelectAsync(HttpContext httpContext, CandidateSet candidateSet)
   at Microsoft.AspNetCore.Routing.Matching.DfaMatcher.SelectEndpointWithPoliciesAsync(HttpContext httpContext, IEndpointSelectorPolicy[] policies, CandidateSet candidateSet)
   at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<Invoke>g__AwaitMatch|8_1(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task matchTask)
   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
  • Steps to reproduce the issue: Navigate to any non-root page, refresh. Or call it directly.

We have a blazor server application. After upgrading from 4.3.X to 5.0.1 we now get a AmbiguousMatchException when calling any path directly that is not the root (e.g. http://localhost:5000/audit-logs). Refreshing the root http://localhost:5000, works fine.

In the migration guide and also when comparing the startup templates, I did not see any changes to modules that we also have to do and that can cause this issues.


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    public override void PreConfigureServices(ServiceConfigurationContext context)
    {
        PreConfigure<AbpAspNetCoreMvcOptions>(options =>
        {
            options.EnableRazorRuntimeCompilationOnDevelopment = false;
        });
    }
    

    https://github.com/abpframework/abp/pull/10947

  • User Avatar
    0
    BassaSolutions created

    This fix will be included in the next 5.0 patch, right?

    It seems like today all issues linked to this patch have been solved, is there an approximate release date?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Yes, We will release the new version soon.

    You need to configure this option by yourself, the next versions won't fix it.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15