2016-05-11 13 views

答えて

2

のために働くようだAccountController.cs

[AllowAnonymous] 
    [Route("Account/LoginCallBack/{error?}")]     
    public ActionResult LoginCallback(string error) 
    { 
     return RedirectToRoute("Error"); 
    } 

https://localhost/firstmvc/Account/LoginCallBack?error=access_denied のためのルートを設定したいパスを記述するためのルートを使用し、DefaultModelBinderする方法を見つけ出すことができませんでしたあなたのためにクエリー・ストリングからメソッド・パラメーターを自動的に引き出します。

[Route("Account/LoginCallBack")]     
public ActionResult LoginCallback(string error) 
{ 
    return RedirectToRoute("Error"); 
    }