문제

I'm trying to use Thinktecture.IdentityModel.45 for authentication in ASP.NET Web API.

I'm trying to get the Basic Authentication to work. And have downloaded the source and got the sample to work. (JsBasicAuth).

We have Web API in the same project as a MVC application. And when the test client calls ~/api/identity all handlers and authorization work. But then the framework (web api) tries to invoke a controller called "identity" and the call fails.

{"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'."}

Do I need to exclude /identity /token from the routing? What am I missing?

도움이 되었습니까?

해결책

I now discovered the Common project in the sample solution. There is a IdentityController there. And I didn't have that in my own project. Now it works! :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top