Hi,<br><br>I saw some requests of people for the abovementioned combination but no easy answer. Sure there is the option of putting apache with mod_proxy in front of your IIS but that adds some administration complexicity.<br>
<br>I hoped for a better solution and after some experimenting I got Tilecache working with the combination<br><br>IIS - Pythonwin32 ISAPI - isapi_wsgi<br><br>I pretty much followed the tutorial here:<br><a href="http://wiki.pylonshq.com/display/pylonscookbook/Serving+a+Pylons+app+with+IIS" target="_blank">http://wiki.pylonshq.com/display/pylonscookbook/Serving+a+Pylons+app+with+IIS</a><br>
<br>The script where it's necessary to put Tilecache instead of Pylons goes like this:<br><br>import isapi_wsgi<br>from TileCache.Service import wsgiApp<br><br># The entry points for the ISAPI extension.<br>def __ExtensionFactory__():<br>
return isapi_wsgi.ISAPIThreadPoolHandler(wsgiApp)<br><br>if __name__=='__main__':<br> from isapi.install import *<br> params = ISAPIParameters()<br> sm = [<br> ScriptMapParams(Extension="*", Flags=0)<br>
]<br> vd = VirtualDirParameters(Name="tilecache_isapi",<br> Description = "tilecache_isapi",<br> ScriptMaps = sm,<br> ScriptMapUpdate = "replace"<br>
)<br> params.VirtualDirs = [vd]<br> HandleCommandLine(params)<br><br>Unfortunately after trying the first request Tilecache didn't go through it's initialization writing this error:<br>
<br>Internal Extension Error: Failed to import callback module 'tilecache_isapi'<br>Traceback (most recent call last):<br> File "C:\ActivePython25\scripts\tilecache_isapi.py", line 19, in <module><br>
from TileCache.Service import wsgiApp<br>
File "c:\activepython25\lib\site-packages\tilecache-2.02-py2.5.egg\TileCache\_<br>_init__.py", line 3, in <module><br> from Layer import *<br> File "c:\activepython25\lib\site-packages\tilecache-2.02-py2.5.egg\TileCache\L<br>
ayer.py", line 6, in <module><br> from Service import TileCacheException<br> File "C:\ActivePython25\lib\site-packages\tilecache-2.02-py2.5.egg\TileCache\S<br>ervice.py", line 14, in <module><br>
workingdir = os.path.abspath(os.path.join(os.getcwd(), os.path.dirname(sys.a<br>rgv[0])))<br>AttributeError: 'module' object has no attribute 'argv'<br><br>Seem's like there is no sys.argv attribute in our environment :-(.<br>
<br>I hardcoded my tilecache.cfg location along the line 14 of Tilecache\Service.py and then it worked :-). Of course hacking the original code is ugly but I'm new to both Python and Tilecache. My first thought would be to create a subclass of Tilecache.Service and providing my own initialization methods. But unfortunately this particular lines of Tilecache.Service are not enclosed in method which I could override. What would be the right approach?<br>
<br>Also I didn't test stability and performance, so If anybody has succes using this combination I would be thankful for comments on these aspects.<br><br>Regards,<br>Tibor<br>