473,320 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Python and IIS 7 - "HTTP Error 502.2 - Bad Gateway"

scubak1w1
Hello,

Gor some new hardware, Windows Server 2008 with IIS 7; I have full admin access... but am new to IIS 7... :-)

I am trying to get Python running under IIS 7 so I can use TileCache:
When I try a simple test file "test.py" I get the error below (note that the file works under IIS 5.1 on my previous hardware - added at the end FYI though...)

HTTP Error 502.2 - Bad Gateway
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "".

Module CgiModule
Notification ExecuteRequestHandler
Handler Python
Error Code 0x00000000


Any pointers would be SINCERELY appreciated... thank you in advance...

Regards,
GREG...

----------------
test.py consists of

Expand|Select|Wrap|Line Numbers
  1. print 'Content-type: text/html'
  2. print
  3. print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"'
  4. print '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
  5. print '<html xmlns="http://www.w3.org/1999/xhtml">'
  6. print
  7. print '<HEAD><TITLE>Python Sample CGI</TITLE></HEAD>'
  8. print '<BODY>'
  9. print '<H2>Here is a web page generated by a Python file/script</H1>'
  10. print
  11. print '<h3 style="color:red">' #this is a comment
  12. print 'See this is just like most other HTML'
  13. print '</h3>'
  14. print '</BODY>'
Apr 10 '09 #1
0 5139

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: vincent wehren | last post by:
Hi, Trying to grasp Py_NewInterpreter()in a simple app embedding Python, I was wondering why the following gives me an error: int main() { PyThreadState *tstate; Py_Initialize();
2
by: Sebastian Stelzer | last post by:
Hi, I'am a beginner in Python and I have got a problem with the TKInter module. When I want to start e.g. pysol, I get following output: Traceback (most recent call last): File...
7
by: Petr Prikryl | last post by:
Hi, Summary: In my opinion, the C-like prefix increment and decrement operators (++i and --i) should be marked as "syntax error". Current situation: try... (Python 2.4 (#60, ...)) >>> i =...
2
by: dunderhead | last post by:
Hello, I would like to use tkSnack through python to manipulate sounds on my fedora 4 system, but I am unable to get the following basic script to run: #!/usr/bin/env python from Tkinter...
2
by: Rossco | last post by:
I have a VB.NET serviced component (COM+), running on a lan, that calls out to an external web service to place an order with a supplier. The problem machine is the middle tier (COM+) for our in...
6
by: bhochstetler | last post by:
I am on a hp 11.11 machine doing a 64 bit python 2.5 build. When I get my python executable created and run it, I get the error: "import site failed" OverflowError: signed integer is greater...
3
by: geddy | last post by:
My OS: Ubuntu 7.04 distribution Mysql: Server version: 5.0.38-Ubuntu_0ubuntu1.2-log Ubuntu 7.04 distribution mysql-python:1.2.2 python:2.5 when I run the following script: import MySQLdb conn...
1
by: bruce | last post by:
i'm getting the following error: mechanize._response.httperror_seek_wrapper: HTTP Error 500: i'm running python 5.1 and mechanize 0.1.7b I have no idea as to what I have to...
33
by: Sunny | last post by:
Hi, Sometime, when your script is too big, IE Gives you a warning "Stop Running This Script" A script on this page is causing Internet Explorer to run slowly. Does anyone knows, How to...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.