Fixing ASP.NET web.config inheritance issues for child applications

Recently while adding a WordPress powered blog as a child application to a ASP.NET 4.5 application in IIS 7.5 I ran into this error:

Unrecognized attribute ‘targetFramework’. Note that attribute names are case-sensitive

Since /blog is setup as a PHP application and I didn’t want to turn on ASP.NET support just so I could stop inheritance through a web.config file I looked for another solution. A quick Google search pulled up this result (Changing ASP.NET web.config inheritance when mixing versions of child applications). According to the article modifying the parent applications web.config taking it from this

<system.web>
 ...your system.web stuff goes here
</system.web>

to this

<location path="." inheritInChildApplications="false">
   <system.web>
    ...your system.web stuff goes here
   </system.web>
</location>

fixes my problem. Great stuff!

Leave a Reply

Your email address will not be published. Required fields are marked *