title: Django + IIS +?
body: <p>I need to run a django app on windows under either IIS6 or IIS7 (yes, I don't know the exact requirements right now).</p>
  
  <p>What I did:<br>
  I've tried to set up a working environment on my windows 7 (so its IIS7 for now) machine. I've followed the instructions at <a href="http://code.djangoproject.com/wiki/DjangoOnWindowsWithIISAndSQLServer" rel="nofollow noreferrer">django trac</a> using <a href="http://sourceforge.net/apps/trac/pyisapie" rel="nofollow noreferrer">PyISAPIe</a>.</p>
  
  <p>What came out of it:<br>
  Apparently, either I am doing something completely wrong, or the <code>pyisapie.py</code> handler, that I am supposed to put into django's <code>core/handlers</code> is very much incompatible with stable django (1.2). There are at least two things that it "does wrong":</p>
  
  <ul>
  <li>it attempts to invoke request_started and request_finished signals using the outdated signatures, - I've fixed those.</li>
  <li>its <code>http.HttpRequest</code> subclass (PyISAPIeRequest) doesn't conform to the HttpRequest interface, - <code>path_info</code> is left out. I suppose, it comes out of the environment, analogous to how the <code>WSGIRequest</code> does it. So I've hacked this in too.</li>
  </ul>
  
  <p>I really have no idea what else will fail on me (apparently, it also has a <a href="http://www.kirit.com/Blog:/2008-08-28/Multipart%20form%20problems%20with%20PyISAPIe%20and%20Django" rel="nofollow noreferrer">problem with multipart forms</a>) and, quite frankly, I am not prepared to accept a solution that might die on me at any moment in production (although, on a side note, I'd love to make the whole IIS+Django thing actually work).</p>
  
  <p>Are there any other ways to run django on windows? Perhaps I can use a standalone server, like flup and use IIS as a reverse proxy (though, I don't know if it is possible at all)? I need the windows+basic authentication, - the application is supposed to use the <a href="http://docs.djangoproject.com/en/1.2/ref/authbackends/#django.contrib.auth.backends.RemoteUserBackend" rel="nofollow noreferrer">remote user authentication backend</a>, though authentication is not the sole reason why IIS has to be used.</p>
  
  <p>I can't use another machine and I am against installing a full-blown web server (I could technically use apache+mod_wsgi). Performance/high availability will not be an issue, but one thing is certain, - large file uploads should be handled correctly (see above about multipart forms).</p>