Click here to Skip to main content
15,935,728 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My IIS subsite take the web.config from the main site. How to avoid it? I want my subsite just read its own web.config and works as independent site

This is how it looks in IIS:[^]

What I have tried:

<location path="." inheritInChildApplications="false">
Updated 19-Oct-22 22:29pm

1 solution

You can't.

You can wrap some sections from the main site config in <location inheritInChildApplications="false"> elements; but some sections don't allow you to prevent inheritance.

In some cases, there will be a syntax to remove or clear the config that was inherited from a parent location. How you do that will depend on which config element is causing the problem.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900