0

シンプルな ASP.NET vNext アプリケーションを構築しようとしています。

シンプルなクライアント側の HTML コードがあります。

<!DOCTYPE html>
<html>
<body>
<form action="/Home/Login" method="post">
    Login: <input type="text" name="login"><br>
    Password: <input type="text" name="password"><br>
    <input type="submit" value="Submit">
</form>
</body>
</html>

そして、POST アクションを処理するための単純なサーバー側コードがあります。

    [HttpPost]
    [AllowAnonymous]
    public IActionResult Login(string login, string password)
    {
        if (Validate(login, password))
        {
            var claims = new[] { new Claim(ClaimTypes.Name, login) };

            var identity = new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationType);

            Context.Response.SignIn(identity);

            return RedirectToAction("Index", "Home");
        }

        return RedirectToAction("Login", "Home");
    }

Windows/IIS Express では正常に動作しますが、Debian/Kestrel では動作せず、サーバー メソッド ログインは呼び出されません。

それで、私の質問は - どうやって Debian で動作させるのですか?

4

0 に答える 0