Problems with Blazor and MVC parts after updating to .NET 6 (Matches, Compiled descriptor)
See original GitHub issueI wanted to upgrade .NET to latest version so my solution is up to date but I encountered two errors. Problems started when I upgraded microsoft.aspnetcore.mvc.razor.runtimecompilation 5.0.3 TO 6.0.0-preview.1.21103.6. When I downgrade back both issues disappear.
If you would like to see project’s code I can try to upload some sources.
For every Blazor page:
AmbiguousMatchException: The request matched multiple endpoints. Matches: /_Host /_Host
Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ReportAmbiguity(CandidateState[] candidateState)
Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ProcessFinalCandidates(HttpContext httpContext, CandidateState[] candidateState)
Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.Select(HttpContext httpContext, CandidateState[] candidateState)
Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.SelectAsync(HttpContext httpContext, CandidateSet candidateSet)
Microsoft.AspNetCore.Routing.Matching.DfaMatcher.SelectEndpointWithPoliciesAsync(HttpContext httpContext, IEndpointSelectorPolicy[] policies, CandidateSet candidateSet)
Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<Invoke>g__AwaitMatch|8_1(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task matchTask)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
For every MVC page:
InvalidOperationException: Setting the compiled descriptor on a compiled descriptor is not allowed.
Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor.set_CompiledPageDescriptor(CompiledPageActionDescriptor value)
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.CompiledPageActionDescriptorFactory.CreateCompiledDescriptor(PageActionDescriptor actionDescriptor, CompiledViewDescriptor viewDescriptor)
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.DefaultPageLoader.LoadAsyncCore(PageActionDescriptor actionDescriptor, EndpointMetadataCollection endpointMetadata)
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageLoaderMatcherPolicy.ApplyAsyncAwaited(CandidateSet candidates, Task<CompiledPageActionDescriptor> actionDescriptorTask, int index)
Microsoft.AspNetCore.Routing.Matching.DfaMatcher.SelectEndpointWithPoliciesAsync(HttpContext httpContext, IEndpointSelectorPolicy[] policies, CandidateSet candidateSet)
Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<Invoke>g__AwaitMatch|8_1(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task matchTask)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
ASP.NET Core updates in .NET 6 Release Candidate 1
In .NET 6, you can now dynamically render Blazor components from JavaScript. ... matching the existing behavior when using IIS Express.
Read more >What's New in ASP.NET Core in .NET 6
With ASP.NET Core, you can build dynamic server-rendered UIs using MVC or Razor Pages. You can integrate ASP.NET Core with popular JavaScript frameworks...
Read more >Blazor CSS Isolation not working and not adding scope ...
NET 3.1 to .NET 5.0 and am trying to switch to using css isolation. I've created a scss file (which compiles to a...
Read more >System.Web.Mvc v5.2.4.0 in UI for ASP.NET MVC
Hi! I'm getting all red squigglies on my CSHTML files but the site is still working without compile-time or runtime errors.
Read more >How do you guys feel about Blazor : r/dotnet
I have a strong background building sites and web apps since aspx and I think blazor is a step back to a state...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This was resolved as part of https://github.com/dotnet/aspnetcore/issues/35060
Related issue: https://github.com/dotnet/aspnetcore/issues/35060