Multiple types were found that match the controller named 'Auth'.
偶然的一个机会,修改了已经开发完毕的一个项目的命名。突然运行发现:
{
"Message": "An error has occurred.",
"ExceptionMessage": "Multiple types were found that match the controller named 'Auth'. This can happen if the route that services this request ('api/{controller}/{action}/{id}') found multiple controllers defined with the same name but differing namespaces, which is not supported.\r\n\r\nThe request for 'Auth' has found the following matching controllers:\r\nDuraRetail.Web.Controllers.AuthController\r\nDoraRetail.Web.Controllers.AuthController",
"ExceptionType": "System.InvalidOperationException",
"StackTrace": " 在 System.Web.Http.Dispatcher.DefaultHttpControllerSelector.SelectController(HttpRequestMessage request)\r\n 在 System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
}
,
通过清理解决方案后还是不行,最后手动把每个项目下的bin obj文件夹删掉。重新生成解决问题,(通过搜索发现在\obj\Release\XXXXXXX.csproj.FileListAbsolute.txt中的记录还是旧的文件名)。
Multiple types were found that match the controller named 'Auth'.的更多相关文章
- ASP.NET MVC报错: Multiple types were found that match the controller named
当使用ASP.NET MVC的Area功能时,出现了这样的错误: Multiple types were found that match the controller named 'Home'. T ...
- MVC 区域内默认控制器不能访问(Multiple types were found that match the controller named ‘Index')
异常处理汇总-后端系列 http://www.cnblogs.com/dunitian/p/4523006.html 错误信息 和主页的默认控制器冲突了,修改下Areas里面的默认控制器就可以了
- Multiple types were found that match the controller named 'Home'. (weird error)
found the error, because I changed the namespace and assembly name, then on the bin folder the old d ...
- [GraphQL] Query Lists of Multiple Types using a Union in GraphQL
Unions are used when we want a GraphQL field or list to handle multiple types of data. With a Union ...
- Owin SelfHost Asp.net WebApi 遇到 No type was found that matches the controller named 'ControllerName' 异常的解决方案
问题背景:在使用普通的SelfHost时,调用其它工程的dll(其实就是把WebApi写到一个单独的工程方便管理),通过加载其他工程的dll然后再访问webapi是没有问题的. 但是在使用Owin S ...
- Multiple actions were found that match the request in Web Api
https://stackoverflow.com/questions/14534167/multiple-actions-were-found-that-match-the-request-in-w ...
- Multiple actions were found that match the request Web API
在WebAPI工程入口不对外公开的接口不能使用public. [HttpPost] public string PostRequest([FromBody] Model model) { /// } ...
- C++编译错误:multiple types in one declaration
这是在使用QT的时候看到的.这种情况往往是结构体或者是class最后少加了一个分好,加上即可,这个bug找了我好久,mark一下.
- MVC 学习系列-Controller
MVC最核心的也就是Controller了,控制器(controller)在功能中起到了核心功能. 1,)在MVC类库中,根据URL,通过MVCHandler进入MVC处理系统中, 2,)解析初始化对 ...
随机推荐
- 变量、常量、input、if语句
Chapter2 Python基础 2.1 变量命名规则 字母.数字.下划线组成 不能数字开头 不能使用python中的关键字 变量名具有意义 推荐驼峰(ArvinGood).或者下划线方式 (arv ...
- java杨辉三角
public static void main(String[] args) { Scanner scanner=new Scanner(System.in); System.out.println( ...
- java日志框架笔记-log4j-springboot整合
# 日志框架slf4j log4j logback之间的关系 简答的讲就是slf4j是一系列的日志接口,而log4j logback是具体实现了的日志框架. ```java SLF4J获得logger ...
- Linux Centos虚拟机扩容(/dev/mapper/centos-root)
1:.首先查看我们的根分区大小是多少 df -h 文件系统 类型 容量 已用 可用 已用% 挂载点 /dev/mapper/centos-root xfs 18G 1.1G 17G 6% / devt ...
- NLP(十) 主题识别
主题识别 是发现输入文本集合中存在的主题的过程 LDA算法,即狄利克雷分布算法 from nltk.tokenize import RegexpTokenizer from nltk.corpus i ...
- ST算法 Sliding Window algorithm template
ST算法(Sliding Window):A easy way to slove the substring problems algorithm template to slove substrin ...
- [普及]NOIP 2015 推销员 贪心
NOIP 2015 推销员 题意: 有一个喜欢疲劳的推销员,告诉你在一个单口胡同(数轴)中的n户家庭的位置,和向他们推销可以获得的疲劳度.分别输出向(1,2,3,4...n)户人家推销可以得到的最大疲 ...
- 计蒜客 蓝桥杯模拟 瞬间移动 dp
在一个 n \times mn×m 中的方格中,每个格子上都有一个分数,现在蒜头君从 (1,1)(1,1) 的格子开始往 (n, m)(n,m) 的格子走.要求从 (x_1,y_1)(x1,y1 ...
- PAT L1-043. 阅览室
L1-043. 阅览室 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 天梯图书阅览室请你编写一个简单的图书借阅统计程序.当读者 ...
- [USACO07OCT]障碍路线 & yzoj P1130 拐弯 题解
题意 给出n* n 的图,A为起点,B为终点,* 为障碍,.可以行走,问最少需要拐90度的弯多少次,无法到达输出-1. 解析 思路:构造N * M * 4个点,即将原图的每个点分裂成4个点.其中点(i ...