You have added the error in ModelState
under the key "LogOnError"
:
ModelState.AddModelError("LogOnError", "The user name or password provided is incorrect.");
This error will appear only if you have a corresponding Html.ValidationMessage
helper in your view:
@Html.ValidationMessage("LogOnError")
If you want the error to appear in the Html.ValidationSummary()
helper use a blank key:
ModelState.AddModelError("", "The user name or password provided is incorrect.");