偶然的一个机会,修改了已经开发完毕的一个项目的命名。突然运行发现:

{
"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'.的更多相关文章

  1. 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 ...

  2. MVC 区域内默认控制器不能访问(Multiple types were found that match the controller named ‘Index')

    异常处理汇总-后端系列 http://www.cnblogs.com/dunitian/p/4523006.html 错误信息 和主页的默认控制器冲突了,修改下Areas里面的默认控制器就可以了

  3. 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 ...

  4. [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 ...

  5. Owin SelfHost Asp.net WebApi 遇到 No type was found that matches the controller named 'ControllerName' 异常的解决方案

    问题背景:在使用普通的SelfHost时,调用其它工程的dll(其实就是把WebApi写到一个单独的工程方便管理),通过加载其他工程的dll然后再访问webapi是没有问题的. 但是在使用Owin S ...

  6. 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 ...

  7. Multiple actions were found that match the request Web API

    在WebAPI工程入口不对外公开的接口不能使用public. [HttpPost] public string PostRequest([FromBody] Model model) { /// } ...

  8. C++编译错误:multiple types in one declaration

    这是在使用QT的时候看到的.这种情况往往是结构体或者是class最后少加了一个分好,加上即可,这个bug找了我好久,mark一下.

  9. MVC 学习系列-Controller

    MVC最核心的也就是Controller了,控制器(controller)在功能中起到了核心功能. 1,)在MVC类库中,根据URL,通过MVCHandler进入MVC处理系统中, 2,)解析初始化对 ...

随机推荐

  1. egret之弹幕

    要实现弹幕功能,首先需要将弹幕配置成配置表.然后代码随机生成. /**生成单个弹幕 */ private showCaptionAnim(captionText: string) { egret.lo ...

  2. Python之流程控制——while循环

    Python之流程控制--while循环 一.语法 while 条件: 执行代码 while就是当的意思,它指当其后面的条件成立,就执行while下面的代码. 例:写一个从0打印到10的程序 coun ...

  3. mac入门之设置

    mac入门: 一般手机软件,都是分设置和业务功能:操作系统亦是如此,设置+必备应用:用设置入门十分合理. 总览: 通用:通用,顾明思意是设置的设置,设置是独立应用之外或者公共的开关,通用更抽象一层,没 ...

  4. Oracle批量更改所有表的字段取值_类型_原字段名

    CREATE PROCEDURE 存储过程名称 is cursor c_tab is select * from user_tab_columns t r_tab user_tab_columns%r ...

  5. C语言打印图形

    //输出图形 * * * * * * * * * * * * * * * * * * * * * * * * * //每行5个* void test1(){ //    外层负责行,外层执行一次,内层 ...

  6. Linux运维基础提高之RAID卡和磁盘分区

    磁盘大小计算: 柱面的数量*每个柱面的大小(容量) [root@luffy001 ~]# fdisk -l Disk /dev/sda: 10.7 GB, 10737418240 bytes 255 ...

  7. I don't Blame You that You don't Understand Me

    I don't Blame You that You don't Understand Me Every one has a dead corner in himself, with no entry ...

  8. 英文写作report

    Writting Attached Files   Maybe you might want to get familiar about how to write the Final report. ...

  9. python-re正则表达--持续更新

    | 模式          | 描述| |----              |----| | \w            | 匹配字母数字及下划线 | | \W           | 匹配非字母数 ...

  10. android- 对话框中弹出edittext 不能调出输入法

    最近项目中用到 dialog弹出对话框功能, 弹出后输入 密码, 本以为这是一个很简单问题,但是做好发现Edittext 无法调出输入法. 解决方法,我也是百度找到的 . 记录一下,便于下次使用: f ...