簡體   English   中英

路由,Thinktecture.IdentityModel.45,想調用身份控制器

[英]Thinktecture.IdentityModel.45, Routing, wants to invoke identity controller

我正在嘗試使用Thinktecture.IdentityModel.45在ASP.NET Web API中進行身份驗證。

我正在嘗試使基本身份驗證起作用。 並已下載源代碼並使示例工作。 (JsBasicAuth)。

我們在與MVC應用程序相同的項目中擁有Web API。 當測試客戶端調用〜/ api / identity時,所有處理程序和授權工作都將生效。 但是,然后框架(Web API)嘗試調用一個稱為“身份”的控制器,並且調用失敗。

{"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? 我想念什么?

我現在在示例解決方案中發現了Common項目。 那里有一個IdentityController。 而且我自己的項目中沒有。 現在可以了! :)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM