<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Setting Up Python on IIS7</title>
	<atom:link href="http://geographika.co.uk/setting-up-python-on-iis7/feed" rel="self" type="application/rss+xml" />
	<link>http://geographika.co.uk/setting-up-python-on-iis7?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=setting-up-python-on-iis7</link>
	<description>Developing geo-technologies</description>
	<lastBuildDate>Wed, 16 May 2012 17:22:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: wolf++ &#187; Running Django on Windows: Python 2.7.2 x64, PyISAPIe and IIS 7.5</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-1715</link>
		<dc:creator>wolf++ &#187; Running Django on Windows: Python 2.7.2 x64, PyISAPIe and IIS 7.5</dc:creator>
		<pubDate>Wed, 14 Mar 2012 03:32:35 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-1715</guid>
		<description>[...] Setting up Python on IIS7 &#8211; http://geographika.co.uk/setting-up-python-on-iis7 [...]</description>
		<content:encoded><![CDATA[<p>[...] Setting up Python on IIS7 &#8211; <a href="http://geographika.co.uk/setting-up-python-on-iis7" rel="nofollow">http://geographika.co.uk/setting-up-python-on-iis7</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Detzler</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-1698</link>
		<dc:creator>Detzler</dc:creator>
		<pubDate>Thu, 23 Feb 2012 15:17:26 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-1698</guid>
		<description>HTTP Error 404.17 – Not Found</description>
		<content:encoded><![CDATA[<p>HTTP Error 404.17 – Not Found</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vaibhav</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-1450</link>
		<dc:creator>Vaibhav</dc:creator>
		<pubDate>Wed, 08 Jun 2011 14:45:46 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-1450</guid>
		<description>Hi,
Thanks for this article, it seems to be very useful.
I&#039;m getting below error
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.

It would be really good if you could provide any pointers as to what is missing which causes this issue. Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Thanks for this article, it seems to be very useful.<br />
I&#8217;m getting below error<br />
HTTP Error 404.17 &#8211; Not Found<br />
The requested content appears to be script and will not be served by the static file handler.</p>
<p>It would be really good if you could provide any pointers as to what is missing which causes this issue. Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MapFish Print Module for IIS at geographika</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-770</link>
		<dc:creator>MapFish Print Module for IIS at geographika</dc:creator>
		<pubDate>Sat, 06 Nov 2010 15:25:07 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-770</guid>
		<description>[...] and configure PyISAPIe. You can follow the instructions described on this post or in the README file included with PyISAPIe . If you want to run a 64 bit version, have a look at [...]</description>
		<content:encoded><![CDATA[<p>[...] and configure PyISAPIe. You can follow the instructions described on this post or in the README file included with PyISAPIe . If you want to run a 64 bit version, have a look at [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timothy Walker</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-644</link>
		<dc:creator>Timothy Walker</dc:creator>
		<pubDate>Wed, 18 Aug 2010 23:41:32 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-644</guid>
		<description>Very good example. Found another good site that shows exactly how to setup CGI II7 and C++, along with your example I have finally setup a nice web host to host my own site! DynDNS offers nice services to do this. There is something generic about have others like GoDaddy host your web site, especially if you are a 7 language programmer! I am not a web master, but I do have 20 years of C++ so why not host my own site! Others can do so as well, but the hardest part of it is finding clear concise examples, and Microsoft does not offer anything close to this. You are wasting your time if you think MS can give you any good help for free! This is the beauty of the web, people like us that can offer better help than major corporations! For free that is.</description>
		<content:encoded><![CDATA[<p>Very good example. Found another good site that shows exactly how to setup CGI II7 and C++, along with your example I have finally setup a nice web host to host my own site! DynDNS offers nice services to do this. There is something generic about have others like GoDaddy host your web site, especially if you are a 7 language programmer! I am not a web master, but I do have 20 years of C++ so why not host my own site! Others can do so as well, but the hardest part of it is finding clear concise examples, and Microsoft does not offer anything close to this. You are wasting your time if you think MS can give you any good help for free! This is the beauty of the web, people like us that can offer better help than major corporations! For free that is.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: geographika &#187; Using TileCache on IIS</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-471</link>
		<dc:creator>geographika &#187; Using TileCache on IIS</dc:creator>
		<pubDate>Sun, 04 Jul 2010 13:01:46 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-471</guid>
		<description>[...] previously written about using PyISAPie to run Python under IIS – this allows Python scripts to run faster than using CGI. Rather than starting up the Python [...]</description>
		<content:encoded><![CDATA[<p>[...] previously written about using PyISAPie to run Python under IIS – this allows Python scripts to run faster than using CGI. Rather than starting up the Python [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: geographika</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-469</link>
		<dc:creator>geographika</dc:creator>
		<pubDate>Wed, 30 Jun 2010 20:48:21 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-469</guid>
		<description>Hi Chris - I uploaded my TileCache script to http://bitbucket.org/geographika/mapserver-scripts/changeset/40e84703a58d

Let me know how you get on. I&#039;ll try and turn my notes into a post at some point. I think there were a couple of changes I have to make in the TileCache scripts themselves due to Python errors.</description>
		<content:encoded><![CDATA[<p>Hi Chris &#8211; I uploaded my TileCache script to <a href="http://bitbucket.org/geographika/mapserver-scripts/changeset/40e84703a58d" rel="nofollow">http://bitbucket.org/geographika/mapserver-scripts/changeset/40e84703a58d</a></p>
<p>Let me know how you get on. I&#8217;ll try and turn my notes into a post at some point. I think there were a couple of changes I have to make in the TileCache scripts themselves due to Python errors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-467</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Fri, 25 Jun 2010 23:18:32 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-467</guid>
		<description>@geographika
first of all: I like your blog and your simple way to explain things, I guess you did already safe some people some time!

you said, that you were  able to get TileCache running on IIS7 with PyISAPIe. Could you give me a hint, how the original tilecache.py has to be changed?

------------------------------
from TileCache import Service, cgiHandler, cfgfiles

if __name__ == &#039;__main__&#039;:
    svc = Service.load(*cfgfiles)
    cgiHandler(svc)
------------------------------

I guess, since it isn&#039;t a CGI script, that has to be adopted... currently I get:

Request handler failed

Traceback (most recent call last):
  File &quot;C:\Python25\PyISAPIe\Http\Isapi.py&quot;, line 49, in Request
    raise ImportError, &quot;[Loading &#039;%s&#039;] %s&quot; % (Env.SCRIPT_TRANSLATED, str(Val))
ImportError: [Loading &#039;\\?\C:\inetpub\wwwroot\tilecache\tilecache.py&#039;] &#039;module&#039; object has no attribute &#039;argv&#039;</description>
		<content:encoded><![CDATA[<p>@geographika<br />
first of all: I like your blog and your simple way to explain things, I guess you did already safe some people some time!</p>
<p>you said, that you were  able to get TileCache running on IIS7 with PyISAPIe. Could you give me a hint, how the original tilecache.py has to be changed?</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
from TileCache import Service, cgiHandler, cfgfiles</p>
<p>if __name__ == &#8216;__main__&#8217;:<br />
    svc = Service.load(*cfgfiles)<br />
    cgiHandler(svc)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>I guess, since it isn&#8217;t a CGI script, that has to be adopted&#8230; currently I get:</p>
<p>Request handler failed</p>
<p>Traceback (most recent call last):<br />
  File &#8220;C:\Python25\PyISAPIe\Http\Isapi.py&#8221;, line 49, in Request<br />
    raise ImportError, &#8220;[Loading '%s'] %s&#8221; % (Env.SCRIPT_TRANSLATED, str(Val))<br />
ImportError: [Loading '\\?\C:\inetpub\wwwroot\tilecache\tilecache.py'] &#8216;module&#8217; object has no attribute &#8216;argv&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-306</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Wed, 28 Apr 2010 20:16:39 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-306</guid>
		<description>&lt;a href=&#039;#comment-168&#039; rel=&quot;nofollow&quot;&gt;@Cyrus&lt;/a&gt;
Cyrus, can you describe what you did here?  How does IIS know to run the rundjango.py file of you do not specify the filename on the command line?</description>
		<content:encoded><![CDATA[<p><a href='#comment-168' rel="nofollow">@Cyrus</a><br />
Cyrus, can you describe what you did here?  How does IIS know to run the rundjango.py file of you do not specify the filename on the command line?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joss</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-299</link>
		<dc:creator>joss</dc:creator>
		<pubDate>Thu, 22 Apr 2010 12:10:53 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-299</guid>
		<description>A quick hack I found very useful was to modify Http/Isapi.py such that it reloads the file if you have modified it:

from PyISAPIe import Env
from hashlib import md5
import imp
from os import stat

Handlers = {}
TimeMap = {}

def Request():
  Script = Env.SCRIPT_NAME
  Key = Name = &#039;__&#039;+md5(Script).hexdigest().upper()
  Handler = Handlers.get(Key, None)
  mtime = stat(Env.SCRIPT_TRANSLATED[4:])[8]
  if not Handler or TimeMap[Key] &lt; mtime:
    Handlers[Key] = imp.load_source(Key, Env.SCRIPT_TRANSLATED).Request
    TimeMap[Key] = mtime
  return Handlers[Key]()</description>
		<content:encoded><![CDATA[<p>A quick hack I found very useful was to modify Http/Isapi.py such that it reloads the file if you have modified it:</p>
<p>from PyISAPIe import Env<br />
from hashlib import md5<br />
import imp<br />
from os import stat</p>
<p>Handlers = {}<br />
TimeMap = {}</p>
<p>def Request():<br />
  Script = Env.SCRIPT_NAME<br />
  Key = Name = &#8216;__&#8217;+md5(Script).hexdigest().upper()<br />
  Handler = Handlers.get(Key, None)<br />
  mtime = stat(Env.SCRIPT_TRANSLATED[4:])[8]<br />
  if not Handler or TimeMap[Key] &lt; mtime:<br />
    Handlers[Key] = imp.load_source(Key, Env.SCRIPT_TRANSLATED).Request<br />
    TimeMap[Key] = mtime<br />
  return Handlers[Key]()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: geographika &#187; Compiling a 64 bit Version of PyISAPIe</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-268</link>
		<dc:creator>geographika &#187; Compiling a 64 bit Version of PyISAPIe</dc:creator>
		<pubDate>Fri, 16 Apr 2010 10:12:22 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-268</guid>
		<description>[...] then set up the PyISAPIe.DLL on IIS7 (using the same process as I detailed here), replacing the 32-bit DLL with my newly compiled 64-bit, and using the DefaultAppPool which should [...]</description>
		<content:encoded><![CDATA[<p>[...] then set up the PyISAPIe.DLL on IIS7 (using the same process as I detailed here), replacing the 32-bit DLL with my newly compiled 64-bit, and using the DefaultAppPool which should [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: geographika &#187; Reboot to Refresh Environment Variables</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-233</link>
		<dc:creator>geographika &#187; Reboot to Refresh Environment Variables</dc:creator>
		<pubDate>Tue, 06 Apr 2010 08:08:41 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-233</guid>
		<description>[...] This knowledge may save a couple of hours of frustration if you are running Python scripts on IIS through PyISAPIe. [...]</description>
		<content:encoded><![CDATA[<p>[...] This knowledge may save a couple of hours of frustration if you are running Python scripts on IIS through PyISAPIe. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: geographika</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-179</link>
		<dc:creator>geographika</dc:creator>
		<pubDate>Mon, 22 Mar 2010 18:04:05 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-179</guid>
		<description>&lt;a href=&#039;#comment-177&#039; rel=&quot;nofollow&quot;&gt;@Jonathan&lt;/a&gt;
TileCache has been running for a couple of months now without any problems. 
Both &lt;a href=&quot;http://sei.maps.ie/wind&quot; rel=&quot;nofollow&quot;&gt;http://sei.maps.ie/wind&lt;/a&gt; and &lt;a href=&quot;http://sei.maps.ie/geothermal&quot; rel=&quot;nofollow&quot;&gt;http://sei.maps.ie/geothermal&lt;/a&gt; are using caches. 
I had both Apache and IIS running the same .map files on the same Windows 2008 64-bit server. 
I used JMeter to test the performance between the two, but after a few consecutive requests Apache froze. &lt;a href=&quot;http://geographika.co.uk/mapserverwindowsapachecrash&quot; rel=&quot;nofollow&quot;&gt;I wasn&#039;t able to find out why&lt;/a&gt;, but IIS and ISAPI were able to handle anything I threw at it. 
I&#039;d strongly recommend using IIS if using Windows. You can also take advantage of the 64-bit MapServer (although a 64-bit Python version is not yet ready as far as I know).</description>
		<content:encoded><![CDATA[<p><a href='#comment-177' rel="nofollow">@Jonathan</a><br />
TileCache has been running for a couple of months now without any problems.<br />
Both <a href="http://sei.maps.ie/wind" rel="nofollow">http://sei.maps.ie/wind</a> and <a href="http://sei.maps.ie/geothermal" rel="nofollow">http://sei.maps.ie/geothermal</a> are using caches.<br />
I had both Apache and IIS running the same .map files on the same Windows 2008 64-bit server.<br />
I used JMeter to test the performance between the two, but after a few consecutive requests Apache froze. <a href="http://geographika.co.uk/mapserverwindowsapachecrash" rel="nofollow">I wasn&#8217;t able to find out why</a>, but IIS and ISAPI were able to handle anything I threw at it.<br />
I&#8217;d strongly recommend using IIS if using Windows. You can also take advantage of the 64-bit MapServer (although a 64-bit Python version is not yet ready as far as I know).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-177</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Sun, 21 Mar 2010 16:49:20 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-177</guid>
		<description>Great Stuff. I was playing with this about two months ago and came to an abrupt halt - python was proving too much of a learning curve. Just to confirm - have you defintely got tilecache working with this set up - and if do - how does it compare with mod_apache?

All the best,

Jonathan</description>
		<content:encoded><![CDATA[<p>Great Stuff. I was playing with this about two months ago and came to an abrupt halt &#8211; python was proving too much of a learning curve. Just to confirm &#8211; have you defintely got tilecache working with this set up &#8211; and if do &#8211; how does it compare with mod_apache?</p>
<p>All the best,</p>
<p>Jonathan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyrus</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-168</link>
		<dc:creator>Cyrus</dc:creator>
		<pubDate>Mon, 15 Mar 2010 05:20:31 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-168</guid>
		<description>Nevermind, I got it working.  Needed the most up to date Pyisapie files.  Then had to mod Pyisapie.py for django 1.0.  Thanks!</description>
		<content:encoded><![CDATA[<p>Nevermind, I got it working.  Needed the most up to date Pyisapie files.  Then had to mod Pyisapie.py for django 1.0.  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyrus</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-167</link>
		<dc:creator>Cyrus</dc:creator>
		<pubDate>Mon, 15 Mar 2010 03:47:51 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-167</guid>
		<description>@geographika

Thanks for that.  I seem to have a common problem with many django-to-ISS wranglers and that is how to properly connect the two together.  I was wondering if you had solved the riddle completely.  I can run the hello.py script and I have also been able to copy the ISAPI.py file into my root directory and given it the name rundjango.py.  Then when I hit http://mysite.com/rundjango.py I get the &quot;Welcome to Django&quot; screen.   But how do I get the PyISAPI/ISAPI connective stuff to know when I hit http://mysite.com/myapp/ that this is python/django?</description>
		<content:encoded><![CDATA[<p>@geographika</p>
<p>Thanks for that.  I seem to have a common problem with many django-to-ISS wranglers and that is how to properly connect the two together.  I was wondering if you had solved the riddle completely.  I can run the hello.py script and I have also been able to copy the ISAPI.py file into my root directory and given it the name rundjango.py.  Then when I hit <a href="http://mysite.com/rundjango.py" rel="nofollow">http://mysite.com/rundjango.py</a> I get the &#8220;Welcome to Django&#8221; screen.   But how do I get the PyISAPI/ISAPI connective stuff to know when I hit <a href="http://mysite.com/myapp/" rel="nofollow">http://mysite.com/myapp/</a> that this is python/django?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: geographika</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-161</link>
		<dc:creator>geographika</dc:creator>
		<pubDate>Sun, 07 Mar 2010 15:55:21 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-161</guid>
		<description>&lt;a href=&#039;#comment-160&#039; rel=&quot;nofollow&quot;&gt;@Cyrus&lt;/a&gt;
Hi Cyrus,

On the &lt;a href=&quot;http://sourceforge.net/projects/pyisapie/files/&quot; rel=&quot;nofollow&quot;&gt;downloads page&lt;/a&gt; there are a few options:

PyISAPIe-1.1.0-rc4-Source.zip 
PyISAPIe-1.1.0-rc4-Py2.6.zip
PyISAPIe-1.1.0-rc4-Py2.5.zip

The first is the sourcecode for the DLL (C++ and Visual Studio solution files). The second two point to the DLLs - select Py2.6 or Py2.5 depending on your installed Python version. These downloads contain the compiled DLLs.</description>
		<content:encoded><![CDATA[<p><a href='#comment-160' rel="nofollow">@Cyrus</a><br />
Hi Cyrus,</p>
<p>On the <a href="http://sourceforge.net/projects/pyisapie/files/" rel="nofollow">downloads page</a> there are a few options:</p>
<p>PyISAPIe-1.1.0-rc4-Source.zip<br />
PyISAPIe-1.1.0-rc4-Py2.6.zip<br />
PyISAPIe-1.1.0-rc4-Py2.5.zip</p>
<p>The first is the sourcecode for the DLL (C++ and Visual Studio solution files). The second two point to the DLLs &#8211; select Py2.6 or Py2.5 depending on your installed Python version. These downloads contain the compiled DLLs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyrus</title>
		<link>http://geographika.co.uk/setting-up-python-on-iis7/comment-page-1#comment-160</link>
		<dc:creator>Cyrus</dc:creator>
		<pubDate>Sun, 28 Feb 2010 23:54:35 +0000</pubDate>
		<guid isPermaLink="false">http://geographika.co.uk/?p=273#comment-160</guid>
		<description>Thanks for the post!!!  I was having the same trouble finding anything about IIS 7 and Python.  I am really just wadding into the IIS waters.  I can find everything and follow your whole post except for one thing, the DLL file.  I downloaded the PyISAPIe package and I have files that end in .h,def, and sln  but no dll.  Do I have to make this file?</description>
		<content:encoded><![CDATA[<p>Thanks for the post!!!  I was having the same trouble finding anything about IIS 7 and Python.  I am really just wadding into the IIS waters.  I can find everything and follow your whole post except for one thing, the DLL file.  I downloaded the PyISAPIe package and I have files that end in .h,def, and sln  but no dll.  Do I have to make this file?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: geographika.co.uk @ 2012-05-19 05:10:05 -->
