title: visual studio putting wrong path for virutalDirectory in applicationhost.config?
body: <p>I recently moved my "My Documents" folder from the C: to the D: drive.  This seems to have broken my ability to debug web app in Visual Studio. I'm assuming that visual studio creates entries like the following in applicationhost.config, and I am wondering where the first physicalPath for the root virtualDirectory comes from, as I am fairly certain that is the problem (I've pretty much confirmed that VS creates an entry like the following when a solution is opened):</p>
  
  <pre><code>            &lt;site name="My.Application-Site" id="2"&gt;
              &lt;application path="/" applicationPool="Clr4IntegratedAppPool"&gt;
                  &lt;virtualDirectory path="/" physicalPath="C:\Users\myname\Documents\My Web Sites\My.Application-Site" /&gt;
              &lt;/application&gt;
              &lt;application path="/My" applicationPool="Clr4IntegratedAppPool"&gt;
                  &lt;virtualDirectory path="/" physicalPath="D:\repos\MyCheckout\My\My.Application" /&gt;
              &lt;/application&gt;
              &lt;bindings&gt;
                  &lt;binding protocol="http" bindingInformation="*:49924:localhost" /&gt;
              &lt;/bindings&gt;
          &lt;/site&gt;
  </code></pre>
  
  <p>When I try to run the app in debugger, the browser pops up with an error, the relevant bits of which are below.  Notice the path to web.config still uses C:, even though it seems to know the right place for tracelogfiles:</p>
  
  <pre><code>HTTP Error 500.19 - Internal Server Error
  The requested page cannot be accessed because the related configuration data for the page is invalid.
  
  Config Error       Cannot read configuration file
  Config File    \\?\C:\Users\myname\Documents\My Web Sites\My.Application-Site(2)\web.config
  Requested URL      http://localhost:50616/My/
  Request Tracing Directory      D:\users\myname\My Documents\IISExpress\TraceLogFiles\
  </code></pre>
  
  <p>So the question is where in Visual Studio (or IIS) is the path for the web.config file determined, and how do I change it.  And/or is there some other reason or insight anyone can provide as to why I am getting this 500.19 error?</p>
  
  <p>Another recent change (other than moving My Documents) is I uninstalled a trial of VS Ultimate 2013 and installed VS Pro 2013 -- could that have somehow caused this?  Both of changes have been made between the time I was last able to debug the app normally and getting this error.</p>