As we know, when application is placed on virtual directory, the web.config (or configuration) also will be inherited the configuration of parent directory application. Sometimes it will cause problems because parent directory contains library (.dll) that doesn’t exist in virtual directory application. So, for the virtual directory application only using web.config itself, the web.config of parent directory application should be added <location> tag with attribute inheritInChildApplications set as false that encapsulate <system.web> and <system.webServer>.
This is the sample:
[code lang=”xml”]
<configuration>
<location path="." inheritInChildApplications="false">
<system.web>
…
</system.web>
</location>
…
<location path="." inheritInChildApplications="false">
<system.webServer>
…
</system.webServer>
</location>
</configuration>
[/code]