title: The resource cannot be found. ASP.NET MVC3
body: <p>I have no idea why this error is occurring after debugging the project even though the codes are default.</p>
  
  <p>Controller</p>
  
  <pre><code>public class HomeController : Controller
  {
      //
      // GET: /Home/
  
      public ActionResult Index()
      {
          return View();
      }
  
  }
  </code></pre>
  
  <p>View</p>
  
  <pre><code> @{
      Layout = null;
  }
  
  &lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Index&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div&gt;
          Hi
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Somehow or rather, after debugging, the Requested URL is always /Views/Home/Index.cshtml but accessing Home via browser is fine. (http://localhost:58323/home)</p>
  
  <p>I googled and solution hints that the problem lies in global. But thats weird, I dont remember making any changes to it. </p>
  
  <p>Global</p>
  
  <pre><code>  public static void RegisterRoutes(RouteCollection routes)
      {
          routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
          routes.MapRoute(
              "Default", // Route name
              "{controller}/{action}/{id}", // URL with parameters
              new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
          );
  
      }
  </code></pre>
  
  <p>Appreciate any help. Thank you</p>