Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from stackoverflow.com Jul 2 '11 at 7:45

This question came from our site for professional and enthusiast programmers.

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.