How to disable asp.net root web.config inheritance on my seekdotnet.com hosting? For example, my website is www.example.com which already has web.config on it running on ASP.NET 4.5 framework.

And I have a subfolder which I have set as a virtual directory application: www.example.com/apps/invocing which runs on MVC website http://www.asp.net/aspnet/samples/aspnet-web-pages

But the issue is it still auto inherits from the root web.config

Note: I try to use the comment <location path="." inheritInChildApplications="false"> in the root web.config, and seems like still inherited the parent /root section. Why is asp.net hard to digest for php programmer like me?


I found the solution

just realize that we need to actually disable the section one by one lol


hi Andrew As the commenters for the previous answer mentioned, you cannot simply add the line

Just below . Instead, you need to wrap the individual web.config sections for which you want to disable inheritance. For example:


While may work for some configuration sections, there are some that instead require a directive, and still others don't seem to support either. In these situations, it's probably appropriate to set inheritInChildApplications="false".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.