---
title: Child web application fails to start
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

By default, child web applications inherit the configuration of their parent application. This can prevent the child application from starting when certain sections of the **web.config** aren't compatible across applications. For example, if the child application doesn't share the same libraries, handlers, modules, master pages or themes with the parent application. This page describes how you can solve some of the situations resulting from nesting different applications together.

## Breaking web.config inheritance in child applications

Use the **location**  tag with the **inheritInChildApplications** attribute set to **false** to ensure that the configuration applies to the parent web application only. This can be useful when you don't want to inherit the parent application's settings to the child application. The path attribute set to "." ensures that the location tag covers the default path.

```html title="Using the location tag break configuration inheritance"

<location path="." inheritInChildApplications="false" >
    <!-- Additional settings -->
</location>

```

### Example

The following example shows how you can break inheritance for **controls**, **namespaces**, **assemblies**, **modules**, and **handlers** in your web.config file. None of the settings enclosed in the **location** tag with **inheritInChildApplications** set to **false** are inherited by the child applications.

```html title="Using the location tag break configuration inheritance"

<location path="." inheritInChildApplications="false" >
      <system.web>
        <controls>
            <!-- Removed for brevity -->
        </controls>
        <namespaces>
            <!-- Removed for brevity -->
        </namespaces>
        <assemblies>
            <!-- Removed for brevity -->
        </assemblies>
    </system.web>
</location>

<location path="." inheritInChildApplications="false" >
    <system.webServer>
        <modules>
            <!-- Removed for brevity -->
        </modules>
        <handlers>
            <!-- Removed for brevity -->
        </handlers> 
    </system.webServer>
</location>

```

> **Tip:** A different approach to removing inheritance is using the **** and **** tags. The tags remove irrelevant modules in the child web application. However, this approach is not supported and implemented the same way across all the elements and items in the web.config file.

## Specifying different web.config configurations for child applications

By specifying a value for the **path** attribute in the **location** tag, you can apply different configuration settings to specific folders and files. This way, you can distribute parent or child application settings through one configuration file.

The default value for the **path** attribute is ".". You can only specify one value in the **path** attribute.

```html

<location path="Folder1" >
    <section1 ... />
    <section2 ... />
</location>
<location path="Folder2" >
    <section1 ... />
    <section2 ... />
</location>

```

### Example

The following example shows a configuration that specifies different settings for two specific folders. One of the folders belongs to a parent application and the nested folder belongs to a child application:

```html

<!-- Configuration for 'Default Web Site' -->
<location path="Default Web Site/ParentApplication" >
    <namespaces>
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
      </namespaces>
</location>

<!-- Configuration for 'ChildApplication' -->
<location path="Default Web Site/ParentApplication/ChildApplication" >
      <namespaces>
          <add namespace="System.IO" />
        <add namespace="System.Text" />
      </namespaces>
</location>

```
