The view ‘Index’ or its master was not found or no view engine supports the searched locations. The following locations were searched:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
The problem will occurs when we trying to access an action in the controller. Consider the below action
|public class HomeController : Controller
public ActionResult Index()
The action index returns a view. Then it will check the corresponding view file in the following locations
Not only the location, it will check corresponding view with the action name that is Index is in our case, with following extensions
In the folder home or shared should contain a file with any of the extension above.
After creating the view in the specified folder the controller will get the correct view, then view will be shown in the page and we can avoid this error. This is one of the error we face when we start mvc projects. But is a basic thing in mvc in .net, it will understood this with in some days after starting study of mvc in .net.