'The view "Authorize" or its master was not found or no view engine supports the searched locations

I want to make a login page and when the user name or password field is empty, it stays on the same page and shows the error message. But I face this error: The view or its master was not found or no view engine supports the searched locations.

This is the controller part:

[HttpPost]
    public ActionResult Authorize()
    {
        return View();
    }

and this is the related part on View:

@using (Html.BeginForm("Authorize", "Login", FormMethod.Post))

and this is the Model :

public partial class User
{
    public int UserID { get; set; }
    [DisplayName("User Name")]
    [Required(ErrorMessage ="This field is required.")]
    public string UserName { get; set; }
    [DataType(DataType.Password)]
    [Required(ErrorMessage = "This field is required.")]
    public string Password { get; set; }
}

Can someone help me, please?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source