2017-06-10 13 views
0

私はアイデンティティ・サーバー4を取得することができました。これは私が何を得るの下アイデンティティ・サーバー4同意ページが表示されない

This localhost page can’t be found No webpage was found for the web address: https://localhost:44361/consent?returnUrl=%2Fconnect%2Fauthorize%2Fconsent%3Fresponse_type%3Did_token%2520token%26client_id%3Dangular2client%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A44380%26scope%3Dopenid%2520email%2520profile%2520securedfilesscope%2520resourcescope%26nonce%3DN0.46395672677896951497118418043%26state%3D14971184180430.1487668170892953 

は彼が同意ビューまたはページを返すために呼び出されると仮定されたインデックスメソッドで同意コントローラです。コントローラーが全くヒットしていないように見えます。

[Route("api/[controller]")] 
public class ConsentController : Controller 
{ 
    // GET: api/values 
    private readonly ILogger<ConsentController> _logger; 
    private readonly IClientStore _clientStore; 
    private readonly IResourceStore _resourceStore; 
    private readonly IIdentityServerInteractionService _interaction; 

    public ConsentController(
     ILogger<ConsentController> logger, 
     IIdentityServerInteractionService interaction, 
     IClientStore clientStore, 
     IResourceStore resourceStore) 
    { 
     _logger = logger; 
     _interaction = interaction; 
     _clientStore = clientStore; 
     _resourceStore = resourceStore; 
    } 

    /// <summary> 
    /// Shows the consent screen 
    /// </summary> 
    /// <param name="returnUrl"></param> 
    /// <returns></returns> 
    [HttpGet] 
    public async Task<IActionResult> Index(string returnUrl) 
    { 
     var vm = await BuildViewModelAsync(returnUrl); 
     if (vm != null) 
     { 
      return View("Index", vm); 
     } 

     return View("Error"); 
    } 

} 

答えて

0

なぜそれがうまくいったのか分かりませんが、これが起こったのです。私はこれをコンセント・コントローラーから[Route("api/[controller]")]を取り除きました。コンセント・ページが表示されました

+0

コンセント・ページが「https:// localhost:44361/consent」で利用可能であると定義されていて、 'https:// localhost:44361/api/consent'で利用可能でした。 – Mashton

+0

ああ!どうもありがとう。これがどこで起こっているのだろうか –

関連する問題