Link to home
Start Free TrialLog in
Avatar of radcaesar
radcaesarFlag for India

asked on

Web.config allowoverride

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.
Avatar of Alfred A.
Alfred A.
Flag of Australia image

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.

<system.web>

      <httpModules lockElements="clear,remove">

      <!-- Long list of httpModules -->

      </httpModules>

      <httpHandlers lockElements="clear,remove">

      <!-- Long list of httpHandlers -->

      </httpHandlers>

</system.web>
ASKER CERTIFIED SOLUTION
Avatar of radcaesar
radcaesar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of radcaesar

ASKER

Managed to solve my problem