Setting up Visual Studio 2008 for Compiling 64-bit DLLs¶
- date:
2010-04-16 10:17
- author:
admin
- category:
bugs, programming
- tags:
64bit, bugs, c++, compiling, service pack, visual studio
- slug:
setting-up-visual-studio-2008-for-compiling-64-bit-dlls
- status:
published
This step should be simple. Run the Visual Studio 2008 SetUp program and check the “X64 Compilers and Tools” option under Visual C++
However firstly don’t run the set up program from the DVD or from an ISO on your hard-disk or you’ll end up with the following error:
‘A problem has been encountered while loading the setup components. Canceling setup’
You need to run the Visual Studio set up through Add/Remove Programs. However once I’d selected the components I got the error below - “A selected drive is no longer valid. Please review your installation path settings before continuing with setup.” Of course *there is no* *option* to review or even see your drive settings…
Thanks to this thread, the solution was to uninstall Visual Studio SP1 through Add/Remove programs (check the “Show Updates” box to see service packs and hot fixes for various programs).
Finally I got the 64-bit compilers installed, and could begin trying to compile PyISAPIe for a 64-bit processor which is a whole different set of problems.
- orphan:
Comments¶
1. Cyrus **
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?
Reply2. geographika **
On the downloads page there are a few options:
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.
Reply3. Cyrus **
@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 “Welcome to Django” 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?
Reply4. Cyrus **
Nevermind, I got it working. Needed the most up to date Pyisapie files. Then had to mod Pyisapie.py for django 1.0. Thanks!
Reply5. Jonathan **
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
Reply6. geographika **
problems. | Both http://sei.maps.ie/wind and http://sei.maps.ie/geothermal 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. I wasn’t able to find out why, but IIS and ISAPI were able to handle anything I threw at it. | I’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).
Reply7. geographika » Reboot to Refresh Environment Variables **
[…] This knowledge may save a couple of hours of frustration if you are running Python scripts on IIS through PyISAPIe. […]
Reply8. geographika » Compiling a 64 bit Version of PyISAPIe **
[…] 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 […]
Reply9. joss **
A quick hack I found very useful was to modify Http/Isapi.py such that it reloads the file if you have modified it:
10. Josh **
the rundjango.py file of you do not specify the filename on the command line?
Reply11. chris **
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?
I guess, since it isn’t a CGI script, that has to be adopted… currently I get:
Request handler failed
str(Val)) | ImportError: [Loading ‘\\?\C:\inetpub\wwwroot\tilecache\tilecache.py’] ‘module’ object has no attribute ‘argv’
Reply12. geographika **
Hi Chris - I uploaded my TileCache script to http://bitbucket.org/geographika/mapserver-scripts/changeset/40e84703a58d
Let me know how you get on. I’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.
Reply13. geographika » Using TileCache on IIS **
[…] 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 […]
Reply14. Timothy Walker **
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.
Reply15. MapFish Print Module for IIS at geographika **
[…] 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 […]
Reply16. Vaibhav **
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.
Reply17. Detzler **
HTTP Error 404.17 - Not Found
Reply18. wolf++ » Running Django on Windows: Python 2.7.2 x64, PyISAPIe and IIS 7.5 **
[…] Setting up Python on IIS7 - http://geographika.co.uk/setting-up-python-on-iis7 […]
Reply19. Ritesh Chandora **
Am I missing something???
Reply20. Ritesh Chandora **
windows server 2008R2
ReplyAdd Comment