I am developing this site, with login functionality.
I have this code in the login page:
var loginResponse = await httpClient.PostAsJsonAsync<LoginRequest>("/api/Account/Login", loginRequest);await js.InvokeVoidAsync("alert", $"Status = {loginResponse.StatusCode}");And in the controller I have a post handler:
[HttpPost][Route("Login")][AllowAnonymous]public ActionResult<UserSession> Login([FromBody] LoginRequest loginRequest){ var jwtAuthenticationManager = new JwtAuthenticationManager(_userAccountService); var userSession = jwtAuthenticationManager.GenerateJwtToken(loginRequest.UserName, loginRequest.Password); if (userSession == null) return Unauthorized(); return userSession;}All of this works fine in development and status is returned as 200, but when I deploy to the test web server, the post returns 405
Could I be missing something in the deployment of the web server?