Web api 在项目名称和名称空间更改后无法正常工作
Web api not working after project name and namespaces change
我更改了我的项目名称和命名空间。在此之前我的项目完全运行,但之后我的令牌提供程序工作并且令牌生成正确并且我可以登录,但是我的另一个 api 控制器不工作。
我在上面的函数中使用了路由前缀和路由属性
config.MapHttpAttributeRoutes();
我的项目是一个基于身份令牌 asp.net 和网络 api 2 ( owin ) 的单页应用程序,我使用 angularjs 作为前端。
错误:
留言:"No HTTP resource was found that matches the request URI 'http://localhost:6611/api/Online/Alarms?unit=A'."
消息详细信息:"No type was found that matches the controller named 'Online'."
或者
"Multiple types were found that match the controller named 'Report'. This can happen if the route that services this request ('api/{controller}/{id}') found multiple controllers defined with the same name but differing namespaces, which is not supported."
清理您的 bin 文件夹,然后重试。
我更改了我的项目名称和命名空间。在此之前我的项目完全运行,但之后我的令牌提供程序工作并且令牌生成正确并且我可以登录,但是我的另一个 api 控制器不工作。
我在上面的函数中使用了路由前缀和路由属性
config.MapHttpAttributeRoutes();
我的项目是一个基于身份令牌 asp.net 和网络 api 2 ( owin ) 的单页应用程序,我使用 angularjs 作为前端。
错误:
留言:"No HTTP resource was found that matches the request URI 'http://localhost:6611/api/Online/Alarms?unit=A'."
消息详细信息:"No type was found that matches the controller named 'Online'."
或者
"Multiple types were found that match the controller named 'Report'. This can happen if the route that services this request ('api/{controller}/{id}') found multiple controllers defined with the same name but differing namespaces, which is not supported."
清理您的 bin 文件夹,然后重试。