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

{
"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. ionic app 监听网络功能

    安装cordova插件: cordova plugin add cordova-plugin-network-information 在app.js 的run()里面的function()注入$cor ...

  2. python学习——列表生成式,生成器和迭代器

    列表生成式 列表生成式,是python内置的非常简单却强大的可以用来创建list的生成式.它可以极大的简化语句. """列表生成式""" # ...

  3. 剖析nsq消息队列(一) 简介及去中心化实现原理

    分布式消息队列nsq,简单易用,去中心化的设计使nsq更健壮,nsq充分利用了go语言的goroutine和channel来实现的消息处理,代码量也不大,读不了多久就没了.后期的文章我会把nsq的源码 ...

  4. Codeforces 814C

    题意略. 思路: 尺取法,依然是要利用之前的结果. 感觉时间复杂度太高了,竟然也过了. #include<bits/stdc++.h> using namespace std; ; ]; ...

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

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

  6. JMeter简介及使用JMeter来访问网站

    参考: http://jmeter.apache.org/ http://blog.chinaunix.net/uid-26884465-id-3416869.html http://www.ltes ...

  7. codeforces 27 E. Number With The Given Amount Of Divisors(数论+dfs)

    题目链接:http://codeforces.com/contest/27/problem/E 题意:问因数为n个的最小的数是多少. 题解:一般来说问到因数差不多都会想到素因子. 任意一个数x=(p1 ...

  8. 创建最简单的exe形式COM组件并在MFC程序调用

    来新公司学习接手新项目,拿到代码打开解决方案看到里面竟然有40几个工程,有点吃惊.具体看代码也有很多之前没见过的写法,上了几天火. 有件事就没太搞明白,按照文档的说法上层很多软件都要调用IO服务器,但 ...

  9. 网络流---最大流(Edmond-Karp算法)的学习

    先上个代码,等有空补充详解 #include<iostream> #include<cstdio> #include<cstring> #include<cm ...

  10. Go操作NSQ

    NSQ是目前比较流行的一个分布式的消息队列,本文主要介绍了NSQ及Go语言如何操作NSQ. NSQ NSQ介绍 NSQ是Go语言编写的一个开源的实时分布式内存消息队列,其性能十分优异. NSQ的优势有 ...