Thinktecture.IdentityModel.45,Routing,想要调用身份控制器

时间:2013-10-15 08:09:59

标签: asp.net asp.net-web-api thinktecture-ident-model

我正在尝试使用Thinktecture.IdentityModel.45进行ASP.NET Web API中的身份验证。

我正在努力让基本身份验证工作。并已下载源并获取样本。 (JsBasicAuth)。

我们在与MVC应用程序相同的项目中使用Web API。当测试客户端调用〜/ api / identity所有处理程序和授权工作时。但随后框架(web api)尝试调用名为“identity”的控制器,并且调用失败。

{"Message":"No HTTP resource was found that matches the request URI 'http://localhost/app/api/identity'.","MessageDetail":"No type was found that matches the controller named 'identity'."}

我是否需要从路由中排除/ identity / token?我错过了什么?

1 个答案:

答案 0 :(得分:0)

我现在在示例解决方案中发现了Common项目。那里有一个IdentityController。我在自己的项目中没有这个。现在它有效! :)