I am trying to setup a Wordpress blog to run in the subdirectory of an ASP.NET wbforms application so I can have http://www.myapplication.com/blog

I have Wordpress running on IIS 7 fine as it's own application but when I create the 'blog' subdirectory and set it to be an application with the Wordpress folder as the application root. I keep coming up against a configuration error...

HTTP Error 500.19 - Internal Server Error
Config Error    Configuration section not allowed to be set below application

I've done quite a bit of searching on this and I have tried modifying the applicationHost.config file to set the following value...

<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />

But the configuration errors persist. Can anyone suggest any other config changes I need to make to allow the Wordpress application to run in the /blog subdirectory?

2 Answers 2


You should disable inheritance. Look at this article, http://www.kowitz.net/archive/2007/05/16/stopping-asp-net-web-config-inheritance.


What is in the web.config that is in your /blog directory? For WordPress to work correctly you just need a very minimal URL rewrite rule which is allowed to be set on sub-directories:

<?xml version="1.0" encoding="UTF-8"?>
                <rule name="WordPress" patternSyntax="Wildcard">
                    <match url="*"/>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
                    <action type="Rewrite" url="index.php"/>

If you really need to set configuration settings that can only be set at the application root (can't think of any) you can always turn the /blog directory into it's own application. This can be done from the IIS Manager. Expand the website and drill down to the 'blog' directory. Right-click on the directory and click 'Convert to application'. The defaults in the dialog that shows up should be OK but you can optionally choose to run WordPress in a different app pool.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.