ASP.Net using wrong web.config for virtual directory
===

We're running IIS 6 on Windows Server 2003 R2.

We want to add a virtual directory that runs under .NET 4.0 to a site that runs under .NET 2.0.  We've given the virtual directory its own app pool, and we've configured the virtual directory to run under 4.0.

The parent site works fine, but the virtual directory throws errors that reference the parent site's web.config file.  We need the virtual directory to use its own web.config file.  

The GUI in the IIS Manager says that the virtual directory is using its own web.config file, but the error messages we get refer to items in the parent's web.config file. 

I'm not sure how to solve the problem.  My best lead so far is from a post on another site said that the problem could be solved with something like this:

    <location path="." inheritInChildApplications="false">
    </location>

Again, I'm not sure this will fix things, and I'm not sure how to figure out where to put it or what it ought to contain.  The parent site is built on top of a CMS system, and its web.config file is reasonably complex.

Thanks,