I am getting the error:
Configuration section can only be set in ApplicationHost.config
if modules tag is NOT COMMENTED OUT in web.config.
<modules runAllManagedModulesForAllRequests="true">………………………………………………….
</modules>
If COMMENTED OUT application will start but my application becomes useless after start page because I must have it to run web app. Since we have pluggedin DevExpress inside the modules tag.
<add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />
I replaced AppHostOnly in the followings:
<section name="isapiFilters" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
<section name="modules" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
<section name="applicationInitialization" allowDefinition="AppHostOnly" overrideModeDefault="Allow" />
with
<section name="isapiFilters" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
<section name="applicationInitialization" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />
but MachineToApplication always return to AppHostOnly in all the 3 sections above. So error continues
Configuration section can only be set in ApplicationHost.config