Child application won't work.

I have a root IIS application, and I have added a child IIS application to it that has its own web.config file.

In my root application web.config I have these lines:

   
 <!--<location path="." inheritInChildApplications="false">--> 
 <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </modules>
    <handlers>
      <remove name="WebServiceHandlerFactory-Integrated" />
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </handlers>
        <httpErrors>
            <error statusCode="404" path="/404.aspx" responseMode="ExecuteURL" />
        </httpErrors>
  <staticContent>
     <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
  </staticContent>
  </system.webServer>
<!--</location>-->

Open in new window



Now, if I uncomment the opening and closing <location> tags above then my child application works fine, but it creates a problem - other children applications stop working.

My child application also has a very large <system.webServer> section. I have tried to place the <clear /> tag in my child application right after the  <system.webServer> tag, but that doesn't do anything. I just get the 500 server error.

Please tell me what I can do to solve this situation.
LVL 1
vituxaAsked:
Who is Participating?
 
vituxaConnect With a Mentor Author Commented:
Solution found!!!! I had to go into the child web.config and use a <remove name="nameOfTheHandler"> in <handlers> and multiple <remove name="nameOfTheModule"> in <modules>
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.