• 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. The request for 'Auth' has found the following matching controllers: DuraRetail.Web.Controllers.AuthController DoraRetail.Web.Controllers.AuthController",
    "ExceptionType": "System.InvalidOperationException",
    "StackTrace": " 在 System.Web.Http.Dispatcher.DefaultHttpControllerSelector.SelectController(HttpRequestMessage request) 在 System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
    }

    通过清理解决方案后还是不行,最后手动把每个项目下的bin obj文件夹删掉。重新生成解决问题,(通过搜索发现在objReleaseXXXXXXX.csproj.FileListAbsolute.txt中的记录还是旧的文件名)。

  • 相关阅读:
    札记:计算机网络篇:物理层
    vs2012 它已停止工作
    php laravel 帧 该文件上传
    2016第一周日
    2015年第1周六
    2016第1周五优化自己
    2016值得关注的语言平台、JS框架
    JS模块化规范CommonJS,AMD,CMD
    2016第1周二
    ReactJS入门教程
  • 原文地址:https://www.cnblogs.com/guaicaiboshi/p/8514360.html
Copyright © 2020-2023  润新知