Blazor异常处理——AmbiguousMatchException: The request matched multiple endpoints

1  异常描述    

An unhandled exception occurred while processing the request.
AmbiguousMatchException: The request matched multiple endpoints. Matches:

/Account/UserManagement (/Account/UserManagement)
/Account/UserManagement (/Account/UserManagement)
Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ReportAmbiguity(Span<CandidateState> candidateState)

 

image

 2 原因

    在代码中搜索关键字“/Account/UserManagement”, 发现有两处:@page "/Account/UserManagement"。

image

 

image

 

    去掉后边这个文件中@page "/Account/UserManagement不当路由指定就可以了。

 

posted on 2025-08-13 11:21  博观约取*厚积薄发  阅读(28)  评论(0)    收藏  举报