Web.config allowoverride

Posted on 2011-05-09
Last Modified: 2012-06-21
I had a CMS which is having a web.config file.

I had a webservice which I had hosted as IIS Application inside the same site which is having its own web.config.

The webservice is referring the <httpModules> and <httpHandlers> from the root web.config and throws "unable to load type" error. S, I had places those <httpModules> and <httpHandlers> inside a location tag in root's web.config file with allowOverride="false"

Now my web service works fine, but some of the functionalities in the CMS didn't work because of this. If I move the <httpModules> and <httpHandlers> outside the location tag it works fine.

Now My question is why the allowoverride affects my root application. I believe this setting was for the child applications inside the same website.
Question by:radcaesar
    LVL 21

    Expert Comment

    You might try locking down your default loaded httpModules and httpHandlers set to avoid being changed with the introduction of allowOverride="false".  This will prevent applications removing or clearing default handlers and modules.


          <httpModules lockElements="clear,remove">

          <!-- Long list of httpModules -->


          <httpHandlers lockElements="clear,remove">

          <!-- Long list of httpHandlers -->


    LVL 9

    Accepted Solution

    You are not getting my problem correctly I think.

    Anyway, I had solved it, The solution is using inheritInChildApplications="false" instead of allowOverride="false" which solves the problem.

    Else, I need to use "Remove" Verb manually in child web.config.
    LVL 9

    Author Closing Comment

    Managed to solve my problem

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
    Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now