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

{
"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. 前端开发-Web标准

    Web标准 1理解:结构 => html表现 => css行为 => js(dom + es) WEB标准(结构.表现.行为分离)有哪些优点呢? 易于维护:只需更改CSS文件,就可以 ...

  2. Delphi - 互斥对象下实现系统的单例模式

    使用CreateMutex函数创建互斥对象 利用Windows系统函数CreateMutex(),找出当前系统是否已经存在指定进程的实例,如果没有则创建一个互斥体. CreateMutex函数原型如下 ...

  3. mysql登录的root密码问题

    先说下场景:官网上下载mysql-5.7.18-winx64包,解压,设置环境变量完毕,执行install等命令安装完毕,一切正常,并未发现有什么问题. 然后使用客户端连接数据库时,死活报错:ERRO ...

  4. 爬虫工程师分享:三步就搞定 Android 逆向

    本文源于我近期的一次公司内部分享,通过逆向某款 APP 来介绍逆向过程.由于仅作为学习用途,APP 的相关信息会被遮盖,敬请理解. 关于逆向 逆向--包括但不限于通过反编译.Hook 等手段,来解析一 ...

  5. HDU4578 线段树(区间更新 + 多种操作)和平方,立方

    参考:https://www.cnblogs.com/H-Vking/p/4297973.html 题意: 虽然是比较裸的线段树,但是比较麻烦,并且有很多细节需要考虑,对着别人的ac代码debug了一 ...

  6. codeforces 389 D. Fox and Minimal path(构造+思维)

    题目链接:https://vjudge.net/contest/175446#problem/J 题解:显然要用最多n个点构成的图要使的得到的最短路条数有1e9次个,显然要有几个数相乘容易想到2的几进 ...

  7. Treasure Hunt CodeForces - 979B

    After the big birthday party, Katie still wanted Shiro to have some more fun. Later, she came up wit ...

  8. CodeForces Round #499 Div2

    A: Stages 题意: 给你n个字符, 现在需要从中选取m个字符,每个字符的花费为在字母表的第几位,并且如果选了某个字符, 那么下一个选择的字符必须要在字母表的2位之后, 假如选了e 那么 不能选 ...

  9. GraphQL Java-入门指南

    GraphQL 既是一种用于 API 的查询语言也是一个满足你数据查询的运行时. GraphQL 对你的 API 中的数据提供了一套易于理解的完整描述,使得客户端能够准确地获得它需要的数据,而且没有任 ...

  10. eclipse的properties文件中文被转码问题

    如图所示:首次在properties里打中文注释,结果一输入中文就自动被转码,于是查看了一下项目的编码是UTF-8的,而eclipse中默认的properties文件编码是ISO的,所以修改一下即可 ...