title: MVC: "The incoming request does not match any route." - with a default request
body: <p>I am getting this error only SOMETIMES (apparently randomly, though I know there's really no such thing in computers).</p>
  
  <p>I'm working on an MVC (release 1) site in VS 2008. The machine is running Windows 7 with IIS 7, but this instance is running under the Webserver built into VS (Cassini?). When I do an F5 to start running it, I will sometimes get an exception trap at the 4th line of the Page_Load method of Default.aspx.cs: </p>
  
  <pre><code>httpHandler.ProcessRequest(HttpContext.Current);
  </code></pre>
  
  <p>The exception method is:
  The incoming request does not match any route.</p>
  
  <p>Examining the <code>HttpContext.Current.Request</code> object shows a path of "/", and a rawUrl of "/Default.aspx?" - i.e, your normal empty request to a site.</p>
  
  <p>The MapRoutes routine is pretty much standard except for a couple of IgnoreRoutes lines (ignore "pics/{*imgfile}", and ignore "{*favicon}").  The Application_Start routine has configuration for a StructureMap, and a call to SetControllerFactory before the call to RegisterRoutes, but it otherwise standard.</p>
  
  <p>Usually, if I restart VS, the problem goes away.  (And almost always if I restart the machine).</p>
  
  <p>Any clues?</p>
  
  <p>Thanks.</p>