c# - 错误:“AmbiguousMatchException:请求匹配多个端点。”
问题描述
在http://localhost:56191/WebImages/index中请求页面时出现错误:
*An unhandled exception occurred while processing the request.*<br>
*AmbiguousMatchException: The request matched multiple endpoints. Matches:*
*WebApp.Controllers.WebImagesController.Index (WebApp)*<br>
*WebApp.Views.WebImagesController.Index (WebApp)*
*Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ReportAmbiguity(CandidateState[] candidateState)*
这可能是因为我因为数据库中的更新而跑了?:
"Scaffold-DbContext "Server=Machinexx; Database=MyDBxx; Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -force"
解决方案
CodeCaster 是对的。我在 View 文件夹中有另一个同名的控制器,但我不知道它是如何到达那里的。
推荐阅读
- wampserver - OSPOS(开源销售点)不适用于带有 wampserver 的 localhost
- ios - React Native KeyboardAvoidingView 在 ios 上不起作用
- excel - VBA Excel 运行时错误 13 类型不匹配
- javascript - 如何通过比较表格等时间表来动态更改单元格的颜色
- r - 如何用均值和 SD 求解 R 中的方程?
- pandas - 将具有 AM/PM 的对象转换为以小时为单位的日期时间向下舍入
- ssl - 客户端上的 Mosquitto docker Socket 错误
, 断开 - javascript - 如何使我的分区在单击时更改颜色?
- c++ - 如何将包含纪元时间的十六进制字符串转换为 time_t?
- android - 为什么我的 Post api 在邮递员中运行但不在 react-native 应用程序中运行