So, I've copied a few methods from one controller to another, moved the respective views into the correct view folder and tried to debug my project..
After trying to navigate to one of the newly copied methods and views I get hit with this lovely error.
Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /subscriber/addphonenumber
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:18.104.22.168
Now, I've double and triple checked that the views are in the right folder, even deleted them, went to the controller actions, right click -> add view and copied the view code over and still no joy.
The controller actions are there, the views are there, what gives?
I've tried cleaning the project, the solution, closing VS and restarting and still... nothing.
Also, when debugging, my breakpoints are never getting hit on the newly copied methods... Not sure what is going on there.
Note: I have NOT made any changes whatsoever to any of the routing configuration, I simply copied the ChangePassword, AddPhoneNumber and VerifyPhoneNumber actions/views from the Manage Controller and Views folder to my Subscriber Controller. These methods and views worked fine before I moved them.
- Why is Visual Studio not hitting my breakpoints
- Why are these views and controller actions not being recognized?
I resolved this issue, check below to see my answer.