title: Fresh Windows + VS2012 = MVC3 Problems
body: <p>I just recently got a fresh install of Windows 7 on a my PC running VS2012/VS2010.  I have an MVC3 project that ran just fine before I pulled it onto this PC to run.  The project still compiles on this PC and I can navigate through my site while running the app in studio (2010 or 2012), but when I tried to POST from ANY form in ANY view and pass an ID by means of the URL like this:</p>
  
  <pre><code>    &lt;form id="ScriptForm" action="/MyApp/ControllerName/ActionName/@ViewBag.IDNumber" method="post"&gt;
      ...
      &lt;/form&gt;
  </code></pre>
  
  <p>...I got <a href="https://stackoverflow.com/q/4610433/590783">this error</a>.  I did some digging and playing around to try to fix this, ultimately taking these steps to try to resolve:</p>
  
  <ol>
  <li>Actually installed ASP.NET via the Windows Components form in Control Panel</li>
  <li>Changed the application to use IIS Express</li>
  </ol>
  
  <p>Well, when I changed it to run under IIS Express, I started getting a different error.</p>
  
  <pre><code>HTTP Error 404.0 - Not Found
  The resource you are looking for has been removed, had its name changed, or is 
  temporarily unavailable.
  
  Most likely causes:
  The directory or file specified does not exist on the Web server.
  The URL contains a typographical error.
  A custom filter or module, such as URLScan, restricts access to the file.
  
  Things you can try:
  Create the content on the Web server.
  Review the browser URL.
  Check the failed request tracing log and see which module is calling SetStatus. For more information, click here.
  
  Detailed Error Information:
  Module     IIS Web Core
  Notification       MapRequestHandler
  Handler    StaticFile
  Error Code     0x80070002
  Requested URL      http://localhost:51596/MyApp/ControllerName/ActionName/1
  Physical Path      C:\CODE\MyApp\ControllerName\ActionName\1
  Logon Method       Anonymous
  Logon User     Anonymous
  Request Tracing Directory      C:\Users\cbarlow\Documents\IISExpress\TraceLogFiles\MYAPP
  
  More Information:
  This error means that the file or directory does not exist on the server. Create the file or directory and try the request again.
  View more information »
  </code></pre>
  
  <p>It's almost as if it is not recognizing that this is a route and is trying to resolve the URL to a physical file (like 1.html) which obviously does not exist.  But why isn't it "doing the MVC thing" and using the route?  I have this in my global.asax:</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>And I know this is running because I can breakpoint it.
  <hr>
  Specs:
  Windows 7 | Visual Studio 2010/2012 | Microsoft MVC3 | IIS Express</p>
  
  <hr>
  
  <p>I've read all these SO posts, none seem to apply in this situation or do not help (mostly, because they apply to actual aspx pages, where I am trying to load pages via controllers):</p>
  
  <p><a href="https://stackoverflow.com/q/1851155/590783">The HTTP verb POST used to access path &#39;/&#39; is not allowed</a></p>
  
  <p><a href="https://stackoverflow.com/q/5238080/590783">The HTTP verb POST used to access path is not allowed</a></p>
  
  <p><a href="https://stackoverflow.com/q/758780/590783">The HTTP verb POST used to access path &#39;/Membership/user/&#39; is not allowed</a></p>
  
  <p><a href="https://stackoverflow.com/q/8350398/590783">The HTTP verb POST used to access path &#39;/Main/[object Object]&#39; is not allowed</a></p>
  
  <p><a href="https://stackoverflow.com/q/4610433/590783">The HTTP verb POST used to access path &#39;[my path]&#39; is not allowed</a></p>
  
  <p><a href="https://stackoverflow.com/q/4699375/590783">HTTP verb POST used to access path &#39;/&#39; is not allowed in Facebook app</a></p>
  
  <hr>
  
  <p>Any ideas?</p>