title: asp.net mvc 4 routing error
body: <p>im currently making an website in asp.net c#, using windows azure with a database, when i push the files to the server it works perfectly, the weird thing is every time i click the play button i get this error. it got to a point where having to keep sending it to the server to preview got annoying, if anyone could help me resolve this would greatly appreciate. also i have read up about "Area registration" and have attempted many ways but none seems to work. this is my RouteConfig.cs</p>
  
  <pre><code>   public class RouteConfig
      {
      public static void RegisterRoutes(RouteCollection routes)
      {
          routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
  routes.MapRoute(
  name: "View",
  url: "{controller}/{action}/{id}",
  defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional}
          ); 
        } 
      }
  </code></pre>
  
  <p>when i edit url: </p>
  
  <pre><code>   "{controller}/{action}/{id}"
  </code></pre>
  
  <p>and put url: </p>
  
  <pre><code>  "Views/Home/{action}/{id}" 
  </code></pre>
  
  <p>the directory just loads, allowing me to manually select files, the error dosnt come up, but the index cant be access, when i click Views, it then becomes " localhost - /Views/" but the page stays the same, i click "views" again and i get a 404 "Requested URL: /Views/Views/"</p>
  
  <p>This is the error i am receiving :</p>
  
  <pre><code> Server Error in '/' Application.
  
  The view 'Index' or its master was not found or no view engine supports the searched     
  locations. The following locations were searched:
  ~/Views/Home/Index.aspx
  ~/Views/Home/Index.ascx
  ~/Views/Shared/Index.aspx
  ~/Views/Shared/Index.ascx
  ~/Views/Home/Index.cshtml
  ~/Views/Home/Index.vbhtml
  ~/Views/Shared/Index.cshtml
  ~/Views/Shared/Index.vbhtml
  
  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. 
  
  Exception Details: System.InvalidOperationException: The view 'Index' or its master was   
  not found or no view engine supports the searched locations. The following locations 
  were searched:
  ~/Views/Home/Index.aspx
  ~/Views/Home/Index.ascx
  ~/Views/Shared/Index.aspx
  ~/Views/Shared/Index.ascx
  ~/Views/Home/Index.cshtml
  ~/Views/Home/Index.vbhtml
  ~/Views/Shared/Index.cshtml
  ~/Views/Shared/Index.vbhtml
  
  Source Error: 
  
  An unhandled exception was generated during the execution of the current web request.   
  Information regarding the origin and location of the exception can be identified using   
  the exception stack trace below.
  
  Stack Trace: 
  
  
  [InvalidOperationException: The view 'Index' or its master was not found or no view     
  engine supports the searched locations. The following locations were searched:
  ~/Views/Home/Index.aspx
  ~/Views/Home/Index.ascx
  ~/Views/Shared/Index.aspx
  ~/Views/Shared/Index.ascx
  ~/Views/Home/Index.cshtml
  ~/Views/Home/Index.vbhtml
  ~/Views/Shared/Index.cshtml
  ~/Views/Shared/Index.vbhtml]
  System.Web.Mvc.ViewResult.FindView(ControllerContext context) +355958
  System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +121
  System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext    
  controllerContext, ActionResult actionResult) +13
  System.Web.Mvc.&lt;&gt;c__DisplayClass1a.&lt;InvokeActionResultWithFilters&gt;b__17() +23
  System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter,    
  ResultExecutingContext preContext, Func`1 continuation) +242
  System.Web.Mvc.&lt;&gt;c__DisplayClass1c.&lt;InvokeActionResultWithFilters&gt;b__19() +21
  System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext    
  controllerContext, IList`1 filters, ActionResult actionResult) +177
  System.Web.Mvc.Async.&lt;&gt;c__DisplayClass2a.&lt;BeginInvokeAction&gt;b__20() +89
  System.Web.Mvc.Async.&lt;&gt;c__DisplayClass25.&lt;BeginInvokeAction&gt;b__22(IAsyncResult  
  asyncResult) +102
  System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
  System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult  
  asyncResult) +43
  System.Web.Mvc.&lt;&gt;c__DisplayClass1d.&lt;BeginExecuteCore&gt;b__18(IAsyncResult asyncResult)  
  +14
  System.Web.Mvc.Async.&lt;&gt;c__DisplayClass4.&lt;MakeVoidDelegate&gt;b__3(IAsyncResult ar) +23
  System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
  System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +57
  System.Web.Mvc.Async.&lt;&gt;c__DisplayClass4.&lt;MakeVoidDelegate&gt;b__3(IAsyncResult ar) +23
  System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
  System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +47
  System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult 
  asyncResult) +10
  System.Web.Mvc.&lt;&gt;c__DisplayClass8.&lt;BeginProcessRequest&gt;b__3(IAsyncResult asyncResult) 
  +25
  System.Web.Mvc.Async.&lt;&gt;c__DisplayClass4.&lt;MakeVoidDelegate&gt;b__3(IAsyncResult ar) +23
  System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
  System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +47
  System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult 
  result) +9
  System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()  
  +9629296
  System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp;  
  completedSynchronously) +155
  
  Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET   
  Version:4.0.30319.18034
  </code></pre>