© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
22 replies
Populus

❔ View cannot be found.

LoginModel.cs
Pages/Account/Login.cshtml
Pages/Account/Register.cshtml

AccountController.cs attached.

Why am I getting the following error when submitting a POST request?
An unhandled exception occurred while processing the request.
InvalidOperationException: The view 'Register' was not found. The following locations were searched:
/Views/Account/Register.cshtml
/Views/Shared/Register.cshtml
/Pages/Shared/Register.cshtml
Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.EnsureSuccessful(IEnumerable<string> originalLocations)
An unhandled exception occurred while processing the request.
InvalidOperationException: The view 'Register' was not found. The following locations were searched:
/Views/Account/Register.cshtml
/Views/Shared/Register.cshtml
/Pages/Shared/Register.cshtml
Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.EnsureSuccessful(IEnumerable<string> originalLocations)
message.txt5.88KB
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

DirectoryEntry cannot be found
C#CC# / help
4y ago
Type cannot be found (CS7069) [Answered]
C#CC# / help
4y ago
✅ View not found?
C#CC# / help
2y ago
❔ Locals view not found
C#CC# / help
3y ago