title: system.webServer/fastCgi/application not working in web.config
body: <p>How do I register an IIS FastCGI application in a MSDeploy's <code>web.config</code> file <a href="http://www.iis.net/configreference/system.webserver/fastcgi/application#005" rel="noreferrer">as documented</a>?</p>
  
  <p>I'm trying to build a simple test MS Web Deploy package installable by
  the Web Platform Installer via a <a href="http://blogs.iis.net/kateroh/archive/2009/10/24/web-pi-extensibility-custom-feeds-installing-custom-applications.aspx" rel="noreferrer">custom feed</a>.  I'm trying to
  register a FastCGI application in the packages <code>web.config</code> as the
  <a href="http://www.iis.net/configreference/system.webserver/fastcgi/application#005" rel="noreferrer">docs indicate is possible</a>.  You can see the <a href="https://github.com/rpatterson/iiswsgi/blob/9b64c08fffdd8a3110e976160037576f907bdc96/sample.msdeploy/IISWSGISampleApp/web.config" rel="noreferrer">web.config file below
  or in github</a>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
    &lt;system.webServer&gt;
      &lt;fastCgi&gt;
        &lt;application fullPath="C:\Python27\python.exe" arguments="-u C:\Python27\Scripts\iiswsgi-script.py" monitorChangesTo="C:\Python27\Scripts\iiswsgi-script.py" maxInstances="1" /&gt;
      &lt;/fastCgi&gt;
  ...
  </code></pre>
  
  <p>This doesn't work when installed via the Web Platform Installer and then tested through Web Matrix/IIS Express.  However, as soon as I run the <code>appcmd.exe</code> command as below and in the <a href="https://github.com/rpatterson/iiswsgi/blob/9b64c08fffdd8a3110e976160037576f907bdc96/install.cmd" rel="noreferrer"><code>install.cmd</code> batch file</a>:</p>
  
  <pre><code>set IIS_BIN=%ProgramFiles%\IIS Express
  "%IIS_BIN%\appcmd.exe" set config -section:system.webServer/fastCgi /+"[fullPath='%SystemDrive%\Python27\python.exe',arguments='-u %SystemDrive%\Python27\Scripts\iiswsgi-script.py',maxInstances='1',monitorChangesTo='%SystemDrive%\Python27\Scripts\iiswsgi-script.py']" /commit:apphost
  </code></pre>
  
  <p>...the FastCGI app works just fine.  IOW, it seems like the <code>&lt;fastCGI&gt;&lt;application&gt;</code> elements in <code>web.config</code> don't take effect, but they do in IIS's <code>applicationhost.config</code> even though the docs indicate this is possible in <code>web.confg</code>.</p>
  
  <p>Is there a way to get this to work in the specific app (through <code>web.config</code> or otherwise) without changing the global IIS config?</p>
  
  <p>I'm doing all this under Windows 7 Professional, Web Platform
  Installer 4.0, and Web Matrix 2.0 RC whose about dialog says:</p>
  
  <pre><code>Version 2.0 RC
  WebMatrix: 7.1.1587.0
  IIS Express: 8.0.8298.0
  .NET Framework: 4.0.30319.17379 built by: FXBETAREL
  Web Deploy: 7.1.1516.0
  SQL Server Compact: 4.0.8854.1
  Web Platform Installer: 7.1.1586.1
  ASP.NET Web Pages: 2.0.20505.0
  ASP.NET Web Pages: 1.0.20105.407
  </code></pre>
  
  <p>The code behind all this is in <a href="https://github.com/rpatterson/iiswsgi" rel="noreferrer">IISWSGI on GitHub</a>, <a href="https://github.com/rpatterson/iiswsgi/commit/9b64c08fffdd8a3110e976160037576f907bdc96" rel="noreferrer">use this commit</a> to test.  To reproduce the
  environment I'm using, see the <a href="https://github.com/rpatterson/iiswsgi#sample-package" rel="noreferrer">IISWSGI documentation</a>.</p>