title: Problem after publishing web application from VS 2010
body: <p>Whenever I publish my MVC web application in VS 2010 via the One-click publish feature (I'm not doing any web.config transforms or anything fancy - yet!). The next time I come to build the app I get the following error:</p>
  
  <p><strong>It is an error to use a section registered as allowDefinition='MachineToApplication'
  beyond application level.  This error can be caused by a virtual directory not being 
  configured as an application in IIS.    in ...MyWebApp\obj\release\package\packagetmp
  \web.config</strong></p>
  
  <p>A new copy of the web.config file is indeed created by VS2010 below the ...MyWebApp\obj\ folder so I deleted the whole obj folder and I was then able to build again.</p>
  
  <p>But I shouldn't have to do that each time I publish - I must have something configured incorrectly - can anyone help please.</p>
  
  <p>Thanks.  </p>