質問

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