X

The view ‘Index’ or its master could not be found. The following locations were searched

One of ASP.NET MVC errors wasted one hour of my life today (of course, it is many times less than this season’s leader SharePoint) but this is still one hour. “The view ‘Index’ or its master could not be found. The following locations were searched” error raised suddenly and I was not able to get over it. Well, this time solution was simple.

The error was:

The view ‘Index’ or its master could not be found. The following locations were searched:
~/Views/Home/Index.aspx
~/Views/Home/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx

It tells about page requested but doesn’t mention exactly what is missing. In my case it was one MvcUserControl that was missing. After inserting correct name for it the error disappeared and everything worked again.

Liked this post? Empower your friends by sharing it!
Categories: ASP.NET

View Comments (6)

  • Any hints?
    I'm trying to walk through NerdDinner (chapter 1 from Professional ASP.NET MVC 1.0), and frustrated by this error.

  • Your article isn't very helpful.

    "In my case it was one MvcUserControl that was missing. After inserting correct name for it the error disappeared and everything worked again."

    Thanks.

  • I fixed this error by changing the Index method from

    return View(_db.MovieSet.ToString());

    to

    ViewData.Model = _db.MovieSet

Related Post