I trying to build up simple ASP.NET vNext application.
I have simple client-side html code:
<!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>
And I have simple server-side code to handle POST action:
[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");
}
With Windows/IIS Express it works fine, with Debian/Kestrel it not works, server method Login in not invoked.
So, my question is - how make it work with Debian?