<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>

<br>FYI, after some offline discussion, it was determined that this is likely an IIS configuration issue.&nbsp; Having said this, I will extend config value server.gzip_compresslevel to allow for value of 0 to allow for gzip compression to be turned off, which solved the issue in this case.<br><br>..Tom<br><br><br><div><div id="ecxSkyDrivePlaceholder"></div>&gt; Subject: RE: [pycsw-devel] Running on Windows 2008 Server IIS7<br>&gt; Date: Fri, 16 Mar 2012 10:33:30 -0700<br>&gt; From: bgodfrey@uidaho.edu<br>&gt; To: tomkralidis@hotmail.com; gcpp.kalxas@gmail.com<br>&gt; CC: pycsw-devel@lists.sourceforge.net<br>&gt; <br>&gt; Hi Tom,  it appears IIS7 does supports chunked transfer encoding from everything I'm reading.  I ran the following command to make sure it was enabled: <br>&gt; <br>&gt; <br>&gt; C:\inetpub\AdminScripts&gt;cscript adsutil.vbs set /W3SVC/AspEnableChunkedEncoding<br>&gt; "TRUE"<br>&gt; Microsoft (R) Windows Script Host Version 5.7<br>&gt; Copyright (C) Microsoft Corporation. All rights reserved.<br>&gt; <br>&gt; AspEnableChunkedEncoding        : (BOOLEAN) True<br>&gt; <br>&gt; C:\inetpub\AdminScripts&gt;<br>&gt; <br>&gt; Are you able to see any difference when you make a request on your end now?<br>&gt; <br>&gt; -Bruce<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; -----Original Message-----<br>&gt; From: Tom Kralidis [mailto:tomkralidis@hotmail.com] <br>&gt; Sent: Friday, March 16, 2012 10:00 AM<br>&gt; To: Godfrey, Bruce; gcpp.kalxas@gmail.com<br>&gt; Cc: pycsw-devel@lists.sourceforge.net<br>&gt; Subject: RE: [pycsw-devel] Running on Windows 2008 Server IIS7<br>&gt; <br>&gt; <br>&gt; <br>&gt; Bruce: thanks for the info.&nbsp; With a command line client, I can get your response, but the headers it returns throw some clients off (like FF for e.g.).<br>&gt; <br>&gt; Here's the headers I get back from your server and a working pycsw install:<br>&gt; <br>&gt; $ GET -e -d "http://localhost/pycsw/trunk/csw.py?service=CSW&amp;version=2.0.2&amp;request=GetCapabilities"<br>&gt; Connection: close<br>&gt; Date: Fri, 16 Mar 2012 16:56:38 GMT<br>&gt; Server: Apache/2.2.14 (Ubuntu)<br>&gt; Content-Type: application/xml; charset=UTF-8<br>&gt; Client-Date: Fri, 16 Mar 2012 16:56:39 GMT<br>&gt; Client-Peer: 127.0.0.1:80<br>&gt; Client-Response-Num: 1<br>&gt; Client-Transfer-Encoding: chunked<br>&gt; <br>&gt; $ GET -e -d "http://dev.insideidaho.org/pycsw/csw.py?service=CSW&amp;version=2.0.2&amp;request=GetCapabilities"<br>&gt; Connection: close<br>&gt; Date: Fri, 16 Mar 2012 16:56:39 GMT<br>&gt; Server: Microsoft-IIS/7.0<br>&gt; Content-Length: 10533<br>&gt; Content-Type: application/xml; charset=UTF-8<br>&gt; Client-Date: Fri, 16 Mar 2012 16:56:54 GMT<br>&gt; Client-Peer: 129.101.196.110:80<br>&gt; Client-Response-Num: 1<br>&gt; X-Powered-By: ASP.NET<br>&gt; <br>&gt; Can you make sure your IIS supports chunked transfer encoding perhaps?&nbsp; http://support.microsoft.com/kb/278998<br>&gt; <br>&gt; Thanks for the valuable testing and feedback again.<br>&gt; <br>&gt; ..Tom<br>&gt; <br>&gt; <br>&gt; <br>&gt; &gt; Subject: RE: [pycsw-devel] Running on Windows 2008 Server IIS7<br>&gt; &gt; Date: Thu, 15 Mar 2012 21:48:41 -0700<br>&gt; &gt; From: bgodfrey@uidaho.edu<br>&gt; &gt; To: tomkralidis@hotmail.com; gcpp.kalxas@gmail.com<br>&gt; &gt; CC: pycsw-devel@lists.sourceforge.net<br>&gt; &gt; <br>&gt; &gt; Hi Tom,<br>&gt; &gt; <br>&gt; &gt; I have gzip compression enabled but I must still have something wrong because I can't get this to work:  http://dev.insideidaho.org/pycsw/csw.py?service=CSW&amp;version=2.0.2&amp;request=GetCapabilities<br>&gt; &gt; <br>&gt; &gt; If I hit just an HTML file like here:  http://dev.insideidaho.org/pycsw/tester/index.html<br>&gt; &gt; <br>&gt; &gt; I get:<br>&gt; &gt; <br>&gt; &gt; RESPONSE HEADER:<br>&gt; &gt; Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8<br>&gt; &gt; Accept-Encoding: gzip, deflate<br>&gt; &gt; Accept-Language: en-us,en;q=0.5<br>&gt; &gt; Connection: keep-alive<br>&gt; &gt; DNT: 1<br>&gt; &gt; Host: dev.insideidaho.org<br>&gt; &gt; User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:10.0.2) Gecko/20100101 Firefox/10.0.2<br>&gt; &gt; <br>&gt; &gt; REQUEST HEADER:<br>&gt; &gt; Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8<br>&gt; &gt; Accept-Encoding: gzip, deflate<br>&gt; &gt; Accept-Language: en-us,en;q=0.5<br>&gt; &gt; Connection: keep-alive<br>&gt; &gt; DNT: 1<br>&gt; &gt; Host: dev.insideidaho.org<br>&gt; &gt; User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:10.0.2) Gecko/20100101 Firefox/10.0.2<br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; It looks like gzip compression is being applied.<br>&gt; &gt; <br>&gt; &gt; Does anything jump out to you?  Maybe I'm missing a content or mime type for the python script?  I'm stumped and stuck.  I've searched the web for a long time and tried many things with no luck.<br>&gt; &gt; <br>&gt; &gt; -Bruce<br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; -----Original Message-----<br>&gt; &gt; From: Tom Kralidis [mailto:tomkralidis@hotmail.com] <br>&gt; &gt; Sent: Thursday, March 15, 2012 5:55 PM<br>&gt; &gt; To: Godfrey, Bruce; gcpp.kalxas@gmail.com<br>&gt; &gt; Cc: pycsw-devel@lists.sourceforge.net<br>&gt; &gt; Subject: RE: [pycsw-devel] Running on Windows 2008 Server IIS7<br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; Bruce: thanks for the info.&nbsp; Looks like the XML in the response is mangled.&nbsp; I wonder if there's an IIS7 compression issue (http://stackoverflow.com/questions/702124/enable-iis7-gzip)?&nbsp; pycsw uses gzip compression when requested by the client headers.<br>&gt; &gt; <br>&gt; &gt; As a test, can you change the file server/server.py, line 172 (https://sourceforge.net/apps/trac/pycsw/browser/tags/1.0.0/server/server.py#L172) from:<br>&gt; &gt; <br>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.gzip =&nbsp;True<br>&gt; &gt; <br>&gt; &gt; to<br>&gt; &gt; <br>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.gzip = False<br>&gt; &gt; <br>&gt; &gt; This forces any compression to be OFF in the response.<br>&gt; &gt; <br>&gt; &gt; Does this work for you?&nbsp; If yes, then I'm guessing IIS7 needs to be configured to support gzip compression.<br>&gt; &gt; <br>&gt; &gt; Thanks again for your valuable testing and feedback.<br>&gt; &gt; <br>&gt; &gt; ..Tom<br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; &gt; Subject: RE: [pycsw-devel] Running on Windows 2008 Server IIS7<br>&gt; &gt; &gt; Date: Wed, 14 Mar 2012 22:54:17 -0700<br>&gt; &gt; &gt; From: bgodfrey@uidaho.edu<br>&gt; &gt; &gt; To: tomkralidis@hotmail.com; gcpp.kalxas@gmail.com<br>&gt; &gt; &gt; CC: pycsw-devel@lists.sourceforge.net<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; Yep, that was it.  Thank you very much for solving that one.<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; It seems I have another issue.  With tester http://dev.insideidaho.org/pycsw/tester/ I can get a GetCapabilities response only if in default.cfg "xml_pretty_print=false".  If I change that to ""xml_pretty_print=true" I don't get anything in the response text box.  <br>&gt; &gt; &gt; <br>&gt; &gt; &gt; If I try to go to:<br>&gt; &gt; &gt; http://dev.insideidaho.org/pycsw/csw.py?service=CSW&amp;version=2.0.2&amp;request=GetCapabilities<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; I get this with "xml_pretty_print=false":<br>&gt; &gt; &gt; This page contains the following errors:<br>&gt; &gt; &gt; error on line 3 at column 27: xmlns:dc: 'http://purl.org/dc/elepabilities xments/1.1/' is not a valid URI<br>&gt; &gt; &gt; Below is a rendering of the page up to the first error.<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; I get this with "xml_pretty_print=true":<br>&gt; &gt; &gt; This webpage is not available<br>&gt; &gt; &gt; The webpage at http://dev.insideidaho.org/pycsw/csw.py?service=CSW&amp;version=2.0.2&amp;request=GetCapabilities might be temporarily down or it may have moved permanently to a new web address.<br>&gt; &gt; &gt; Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; Is there something in default.cfg that I might have incorrect?  <br>&gt; &gt; &gt; <br>&gt; &gt; &gt; Thank you for your patience working through this with me.<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; -Bruce<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; <br>&gt; &gt; &gt; -----Original Message-----<br>&gt; &gt; &gt; From: Tom Kralidis [mailto:tomkralidis@hotmail.com] <br>&gt; &gt; &gt; Sent: Wednesday, March 14, 2012 3:58 PM<br>&gt; &gt; &gt; To: Godfrey, Bruce; gcpp.kalxas@gmail.com<br>&gt; &gt; &gt; Cc: pycsw-devel@lists.sourceforge.net<br>&gt; &gt; &gt; Subject: RE: [pycsw-devel] Running on Windows 2008 Server IIS7<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; <br>&gt; &gt; &gt; <br>&gt; &gt; &gt; Bruce: thanks for the info.&nbsp; Any chance that there are multiple Python installs?&nbsp; You have sqlalchemy from the command line, but is it the same Python being used by IIS?&nbsp; Where is sqlalchemy installed?&nbsp; Perhaps you can set the PYTHONPATH environment variable to this directory?<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; ..Tom<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; <br>&gt; &gt; &gt; <br>&gt; &gt; &gt; Subject: RE: [pycsw-devel] Running on Windows 2008 Server IIS7<br>&gt; &gt; &gt; Date: Wed, 14 Mar 2012 14:22:05 -0700<br>&gt; &gt; &gt; From: bgodfrey@uidaho.edu<br>&gt; &gt; &gt; To: tomkralidis@hotmail.com; gcpp.kalxas@gmail.com<br>&gt; &gt; &gt; CC: pycsw-devel@lists.sourceforge.net<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; <br>&gt; &gt; &gt; <br>&gt; &gt; &gt; <br>&gt; &gt; &gt; .ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal<br>&gt; &gt; &gt; {margin-bottom:.0001pt;font-size:12.0pt;font-family:"Times New Roman","serif";}<br>&gt; &gt; &gt; .ExternalClass h2<br>&gt; &gt; &gt; {margin-bottom:.0001pt;font-size:20.5pt;font-family:"Times New Roman","serif";color:#CC0000;font-weight:bold;}<br>&gt; &gt; &gt; .ExternalClass h3<br>&gt; &gt; &gt; {margin-right:0in;margin-bottom:0in;margin-left:0in;margin-bottom:.0001pt;font-size:17.0pt;font-family:"Times New Roman","serif";color:#CC0000;font-weight:bold;}<br>&gt; &gt; &gt; .ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink<br>&gt; &gt; &gt; {color:blue;text-decoration:underline;}<br>&gt; &gt; &gt; .ExternalClass a:visited, .ExternalClass span.ecxMsoHyperlinkFollowed<br>&gt; &gt; &gt; {color:purple;text-decoration:underline;}<br>&gt; &gt; &gt; .ExternalClass p<br>&gt; &gt; &gt; {margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:"Times New Roman","serif";}<br>&gt; &gt; &gt; .ExternalClass pre<br>&gt; &gt; &gt; {margin-bottom:.0001pt;font-size:10.0pt;font-family:"Courier New";}<br>&gt; &gt; &gt; .ExternalClass span.ecxHTMLPreformattedChar<br>&gt; &gt; &gt; {font-family:Consolas;}<br>&gt; &gt; &gt; .ExternalClass span.ecxEmailStyle20<br>&gt; &gt; &gt; {font-family:"Calibri","sans-serif";color:#1F497D;}<br>&gt; &gt; &gt; .ExternalClass span.ecxHeading2Char<br>&gt; &gt; &gt; {color:#CC0000;font-weight:bold;}<br>&gt; &gt; &gt; .ExternalClass span.ecxHeading3Char<br>&gt; &gt; &gt; {color:#CC0000;font-weight:bold;}<br>&gt; &gt; &gt; .ExternalClass .ecxMsoChpDefault<br>&gt; &gt; &gt; {font-size:10.0pt;}<br>&gt; &gt; &gt; @page WordSection1<br>&gt; &gt; &gt; {size:8.5in 11.0in;}<br>&gt; &gt; &gt; .ExternalClass div.ecxWordSection1<br>&gt; &gt; &gt; {page:WordSection1;}<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; Here is the error returned from your script:&nbsp;HTTP Error 502.2 - Bad GatewayThe specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "Traceback (most recent call last): File "C:\criticalApplications\console\pycsw\pycsw-1.0.0\test3.py", line 4, in &lt;module&gt; import sqlalchemy ImportError: No module named sqlalchemy ".&nbsp;But, in a python shell if I request the version I get '0.7.5' though as shown here:&nbsp;Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32Type "copyright", "credits" or "license()" for more information.&gt;&gt;&gt; import sqlalchemy&gt;&gt;&gt; sqlalchemy.__version__'0.7.5'&gt;&gt;&gt;&nbsp;&nbsp;And, I see "sqlalchemy' show up in the list when I use "help('modules')".&nbsp;Ideas on how best to proceed?&nbsp;-Bruce&nbsp;&nbsp;From: Tom Kralidis [mailto:tomkralidis@hotmail.com] <br>&gt; &gt; &gt; Sent: Wednesday, March 14, 2012 1:32 PM<br>&gt; &gt; &gt; To: Godfrey, Bruce; gcpp.kalxas@gmail.com<br>&gt; &gt; &gt; Cc: pycsw-devel@lists.sourceforge.net<br>&gt; &gt; &gt; Subject: RE: [pycsw-devel] Running on Windows 2008 Server IIS7&nbsp; <br>&gt; &gt; &gt; Bruce: thanks for the info.&nbsp; I'm wondering about the sqlalchemy issue, and the fact that it's not found is causing an error right away.&nbsp; Can you try, as a cgi script:<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; #!/Python27/python -u<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; import os<br>&gt; &gt; &gt; import sqlalchemy<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; print 'Content-type:text/plain\n\n'<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; for k,v in os.environ.iteritems():<br>&gt; &gt; &gt; &nbsp;&nbsp;&nbsp; print '%s -&gt; %s' %(k,v)<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; This should run fine assuming sqlalchemy can be found in your environment in IIS, and we can see what environment variables IIS is working with at runtime.<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; I don't have an IIS environment, so if you can try, that would be great.&nbsp; We can then figure out a way to patch the IIS environment variables in the codebase.<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; Thanks<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; ..Tom<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; &nbsp;<br>&gt; &gt; &gt; Date: Wed, 14 Mar 2012 12:47:35 -0700<br>&gt; &gt; &gt; From: bgodfrey@uidaho.edu<br>&gt; &gt; &gt; To: gcpp.kalxas@gmail.com<br>&gt; &gt; &gt; CC: pycsw-devel@lists.sourceforge.net<br>&gt; &gt; &gt; Subject: Re: [pycsw-devel] Running on Windows 2008 Server IIS7<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; &nbsp;<br>&gt; &gt; &gt; &nbsp;<br>&gt; &gt; &gt; &nbsp;<br>&gt; &gt; &gt; .ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal<br>&gt; &gt; &gt; {margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri","sans-serif";color:black;}<br>&gt; &gt; &gt; .ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink<br>&gt; &gt; &gt; {color:blue;text-decoration:underline;}<br>&gt; &gt; &gt; .ExternalClass a:visited, .ExternalClass span.ecxMsoHyperlinkFollowed<br>&gt; &gt; &gt; {color:purple;text-decoration:underline;}<br>&gt; &gt; &gt; .ExternalClass pre<br>&gt; &gt; &gt; {margin-bottom:.0001pt;font-size:10.0pt;font-family:"Courier New";color:black;}<br>&gt; &gt; &gt; .ExternalClass span.ecxHTMLPreformattedChar<br>&gt; &gt; &gt; {font-family:Consolas;color:black;}<br>&gt; &gt; &gt; .ExternalClass span.ecxEmailStyle19<br>&gt; &gt; &gt; {font-family:"Calibri","sans-serif";color:windowtext;}<br>&gt; &gt; &gt; .ExternalClass span.ecxEmailStyle20<br>&gt; &gt; &gt; {font-family:"Calibri","sans-serif";color:#1F497D;}<br>&gt; &gt; &gt; .ExternalClass span.ecxEmailStyle21<br>&gt; &gt; &gt; {font-family:"Calibri","sans-serif";color:#1F497D;}<br>&gt; &gt; &gt; .ExternalClass .ecxMsoChpDefault<br>&gt; &gt; &gt; {font-size:10.0pt;}<br>&gt; &gt; &gt; @page WordSection1<br>&gt; &gt; &gt; {size:8.5in 11.0in;}<br>&gt; &gt; &gt; .ExternalClass div.ecxWordSection1<br>&gt; &gt; &gt; {page:WordSection1;}<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; &nbsp;I added system added environment variable for 'HTTP_HOST' and 'REQUEST_URI'.&nbsp; That appears to have gotten me further along.&nbsp; But, I have another hurdle to clear it appears.&nbsp; See below.&nbsp;I've got simple test python scripts working in the same web directory as cws.py.&nbsp; They can be seen here:http://dev.insideidaho.org/pycsw/test.py and http://dev.insideidaho.org/pycsw/test2.py.&nbsp; So, I think (fingers crossed) that I have the web server configured correctly but maybe I am overlooking something.&nbsp;When I use the pycsw tester to try make a GetCapabilities request I get a 502 error.&nbsp; &nbsp;Pycsw tester is here: http://dev.insideidaho.org/pycsw/tester/index.html&nbsp;When I run pycsw on the localhost machine I get this response with more details:&nbsp;#############################BEGIN RESPONSE#################################&nbsp;&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;title&gt;IIS 7.0 Detailed Error - 502.2 - Bad Gateway&lt;/title&gt; &lt;style type="text/css"&gt; &lt;!-- body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;background:#CBE1EF;} code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;} .config_source code{font-size:.8em;color:#000000;} pre{margin:0;font-size:1.4em;word-wrap:break-word;} ul,ol{margin:10px 0 10px 40px;} ul.first,ol.first{margin-top:5px;} fieldset{padding:0 15px 10px 15px;} .summary-container fieldset{padding-bottom:5px;margin-top:4px;} legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;} legend{color:#333333;padding:4px 15px 4px 10px;margin:4px 0 8px -12px;_margin-top:0px; &nbsp;border-top:1px solid #EDEDED;border-left:1px solid #EDEDED;border-right:1px solid #969696; &nbsp;border-bottom:1px solid #969696;background:#E7ECF0;font-weight:bold;font-size:1em;} a:link,a:visited{color:#007EFF;font-weight:bold;} a:hover{text-decoration:none;} h1{font-size:2.4em;margin:0;color:#FFF;} h2{font-size:1.7em;margin:0;color:#CC0000;} h3{font-size:1.4em;margin:10px 0 0 0;color:#CC0000;} h4{font-size:1.2em;margin:10px 0 5px 0; }#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS",Verdana,sans-serif; &nbsp;color:#FFF;background-color:#5C87B2; }#content{margin:0 0 0 2%;position:relative;} .summary-container,.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;} .config_source{background:#fff5c4;} .content-container p{margin:0 0 10px 0; }#details-left{width:35%;float:left;margin-right:2%; }#details-right{width:63%;float:left; }#server_version{width:96%;_height:1px;min-height:1px;margin:0 0 5px 0;padding:11px 2% 8px 2%;color:#FFFFFF; &nbsp;background-color:#5A7FA5;border-bottom:1px solid #C1CFDD;border-top:1px solid #4A6C8E;font-weight:normal; &nbsp;font-size:1em;color:#FFF;text-align:right; }#server_version p{margin:5px 0;} table{margin:4px 0 4px 0;width:100%;border:none;} td,th{vertical-align:top;padding:3px 0;text-align:left;font-weight:bold;border:none;} th{width:30%;text-align:right;padding-right:2%;font-weight:normal;} thead th{background-color:#ebebeb;width:25%; }#details-right th{width:20%;} table tr.alt td,table tr.alt th{background-color:#ebebeb;} .highlight-code{color:#CC0000;font-weight:bold;font-style:italic;} .clear{clear:both;} .preferred{padding:0 5px 2px 5px;font-weight:normal;background:#006633;color:#FFF;font-size:.8em;} --&gt; &lt;/style&gt; &nbsp;&lt;/head&gt; &lt;body&gt; &lt;div id="header"&gt;&lt;h1&gt;Server Error in Application "DEFAULT WEB SITE/PYCSW"&lt;/h1&gt;&lt;/div&gt; &lt;div id="server_version"&gt;Internet Information Services 7.0&lt;BR&gt;&lt;/div&gt; &lt;div id="content"&gt; &lt;div class="content-container"&gt; &nbsp;&lt;fieldset&gt;&lt;legend&gt;Error Summary&lt;/legend&gt; &nbsp;&nbsp;&lt;h2&gt;HTTP Error 502.2 - Bad Gateway&lt;/h2&gt; &nbsp;&nbsp;&lt;h3&gt;The specified CGI application misbehaved by not returning a complete set of HTTP headers.&nbsp; The headers it did return are &amp;quot;Traceback (most recent call last):&nbsp; File &amp;quot;C:\criticalApplications\console\pycsw\pycsw-1.0.0\csw.py&amp;quot;, line 34, in &amp;lt;module&amp;gt;&nbsp;&nbsp;&nbsp; from server import server&nbsp; File &amp;quot;C:\criticalApplications\console\pycsw\pycsw-1.0.0\server\server.py&amp;quot;, line 40, in &amp;lt;module&amp;gt;&nbsp;&nbsp;&nbsp; import config, fes, log, profile, repository, util&nbsp; File &amp;quot;C:\criticalApplications\console\pycsw\pycsw-1.0.0\server\repository.py&amp;quot;, line 33, in &amp;lt;module&amp;gt;&nbsp;&nbsp; &nbsp;from sqlalchemy import create_engine, desc, funcImportError: No module named sqlalchemy&amp;quot;.&lt;/h3&gt; &nbsp;&lt;/fieldset&gt; &lt;/div&gt; &lt;div class="content-container"&gt; &nbsp;&lt;fieldset&gt;&lt;legend&gt;Detailed Error Information&lt;/legend&gt; &nbsp;&nbsp;&lt;div id="details-left"&gt; &nbsp;&nbsp;&nbsp;&lt;table border="0" cellpadding="0" cellspacing="0"&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;tr class="alt"&gt;&lt;th&gt;Module&lt;/th&gt;&lt;td&gt;CgiModule&lt;/td&gt;&lt;/tr&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;&lt;th&gt;Notification&lt;/th&gt;&lt;td&gt;ExecuteRequestHandler&lt;/td&gt;&lt;/tr&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;tr class="alt"&gt;&lt;th&gt;Handler&lt;/th&gt;&lt;td&gt;Python&lt;/td&gt;&lt;/tr&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;&lt;th&gt;Error Code&lt;/th&gt;&lt;td&gt;0x00000001&lt;/td&gt;&lt;/tr&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/table&gt; &nbsp;&nbsp;&lt;/div&gt; &nbsp;&nbsp;&lt;div id="details-right"&gt; &nbsp;&nbsp;&nbsp;&lt;table border="0" cellpadding="0" cellspacing="0"&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;tr class="alt"&gt;&lt;th&gt;Requested URL&lt;/th&gt;&lt;td&gt;http://dev.insideidaho.org:80/pycsw/csw.py&lt;/td&gt;&lt;/tr&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;&lt;th&gt;Physical Path&lt;/th&gt;&lt;td&gt;C:\criticalApplications\console\pycsw\pycsw-1.0.0\csw.py&lt;/td&gt;&lt;/tr&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;tr class="alt"&gt;&lt;th&gt;Logon Method&lt;/th&gt;&lt;td&gt;Anonymous&lt;/td&gt;&lt;/tr&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;&lt;th&gt;Logon User&lt;/th&gt;&lt;td&gt;Anonymous&lt;/td&gt;&lt;/tr&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/table&gt; &nbsp;&nbsp;&nbsp;&lt;div class="clear"&gt;&lt;/div&gt; &nbsp;&nbsp;&lt;/div&gt; &nbsp;&lt;/fieldset&gt; &lt;/div&gt; &lt;div class="content-container"&gt; &nbsp;&lt;fieldset&gt;&lt;legend&gt;Most likely causes:&lt;/legend&gt; &nbsp;&nbsp;&lt;ul&gt; &nbsp;&nbsp;&nbsp; &lt;li&gt;The CGI process was shut down or terminated unexpectedly before it finished processing the request.&lt;/li&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;li&gt;The CGI process has a flaw and does not return a complete set of HTTP headers.&lt;/li&gt; &lt;/ul&gt; &nbsp;&lt;/fieldset&gt; &lt;/div&gt; &lt;div class="content-container"&gt; &nbsp;&lt;fieldset&gt;&lt;legend&gt;Things you can try:&lt;/legend&gt; &nbsp;&nbsp;&lt;ul&gt; &nbsp;&nbsp;&nbsp; &lt;li&gt;Check the event logs on the system to see whether the CGI process is shutting down unexpectedly.&lt;/li&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;li&gt;Troubleshoot the CGI application to determine why it is not sending a complete set of HTTP headers.&lt;/li&gt; &lt;/ul&gt; &nbsp;&lt;/fieldset&gt; &lt;/div&gt; &nbsp;&nbsp;&lt;div class="content-container"&gt; &nbsp;&lt;fieldset&gt;&lt;legend&gt;Links and More Information&lt;/legend&gt; &nbsp;&nbsp;This error occurs when the CGI process handling the request exits before it finishes sending the response to IIS. &nbsp;&nbsp;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=62293&amp;amp;IIS70Error=502,2,0x00000001,6002"&gt;View more information &amp;raquo;&lt;/a&gt;&lt;BR&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;/fieldset&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt;&nbsp;#############################END RESPONSE#################################&nbsp;&nbsp;Note that "sqlalchemy' show up in the list when I use "help('modules')" &nbsp;It seems like the crux of the issue is that IIS7 doesn't like the way the HTTP headers being returned by the pycsw script(s).&nbsp; Maybe a syntax issue?&nbsp; I'm not sure.&nbsp; I'm definitely no expert.&nbsp; Since I can run the test.py scripts I'm hoping that the web server is configured properly.&nbsp; If not I'm not quite sure where to look at this point.&nbsp; But, maybe it is still an IIS7 configuration issue.&nbsp;Ideas on how to troubleshoot this or get it working? &nbsp;Thanks much!&nbsp;-Bruce&nbsp;&nbsp;From: Angelos Tzotsos [mailto:gcpp.kalxas@gmail.com] <br>&gt; &gt; &gt; Sent: Tuesday, March 13, 2012 6:08 PM<br>&gt; &gt; &gt; To: Godfrey, Bruce<br>&gt; &gt; &gt; Cc: pycsw-devel@lists.sourceforge.net<br>&gt; &gt; &gt; Subject: Re: [pycsw-devel] Running on Windows 2008 Server IIS7&nbsp;Hi Bruce,<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; Yes, it seems that this issue is Windows specific. The "HTTP_HOST" variable is not set in the environment variables.<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; Please try this from a Python console:<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; import os<br>&gt; &gt; &gt; os.environ<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; and send the output.<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; Thanks,<br>&gt; &gt; &gt; Angelos<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; On 03/14/2012 01:29 AM, Godfrey, Bruce wrote: Hi Angelos,&nbsp;Yes, thank you, I was able to get it working using the syntax C:\\www\\pycsw&nbsp;I've run into this issue now:&nbsp;Traceback (most recent call last):&nbsp; File "C:\criticalApplications\console\pycsw\pycsw-1.0.0\csw.py", line 40, in &lt;module&gt;&nbsp;&nbsp;&nbsp; CSW.dispatch()&nbsp; File "C:\criticalApplications\console\pycsw\pycsw-1.0.0\server\server.py", line 161, in dispatch&nbsp;&nbsp;&nbsp; (os.environ['HTTP_HOST'], os.environ['REQUEST_URI'])&nbsp; File "C:\Python27\lib\os.py", line 423, in __getitem__&nbsp;&nbsp;&nbsp; return self.data[key.upper()]KeyError: 'HTTP_HOST'&gt;&gt;&gt;&nbsp;&nbsp;I think I'm close but I'm not sure where to look to try to track this down.&nbsp; I wonder if it is an IIS7 issue?&nbsp;-Bruce&nbsp;From: Angelos Tzotsos [mailto:gcpp.kalxas@gmail.com] <br>&gt; &gt; &gt; Sent: Tuesday, March 13, 2012 4:22 PM<br>&gt; &gt; &gt; To: pycsw-devel@lists.sourceforge.net<br>&gt; &gt; &gt; Subject: Re: [pycsw-devel] Running on Windows 2008 Server IIS7&nbsp;Hello Bruce,<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; Did you try the windows path like c:\path\to\pycsw ?<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; Regards,<br>&gt; &gt; &gt; Angelos<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; On 03/13/2012 04:44 AM, Godfrey, Bruce wrote: Hello,&nbsp;I'm attempting to get pycsw running on a Windows 2008 box with IIS7.&nbsp; I have all the supporting libraries installed and I have SQLite3.&nbsp; I'll preface this by saying I have pretty limited experience with python.&nbsp; &nbsp;I've changed the first line of csw.py to: #!/Python27/python -u&nbsp;At this point I need edit default.cfg, correct?&nbsp;What is the correct syntax for:&nbsp; home=/var/www/pycsw on Windows?&nbsp; Is it like: c:\path\to\defaul.cfg?&nbsp;Thank you for any assistance in getting this running on my Windows box.&nbsp; I really appreciate it.&nbsp; &nbsp;-Bruce&nbsp;&nbsp;<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; &nbsp;<br>&gt; &gt; &gt; &nbsp;<br>&gt; &gt; &gt; ------------------------------------------------------------------------------Keep Your Developer Skills Current with LearnDevNow!The most comprehensive online learning library for Microsoft developersis just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,Metro Style Apps, more. Free future releases when you subscribe now!http://p.sf.net/sfu/learndevnow-d2d<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; &nbsp;<br>&gt; &gt; &gt; &nbsp;<br>&gt; &gt; &gt; _______________________________________________pycsw-devel mailing listpycsw-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/pycsw-devel<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; &nbsp;<br>&gt; &gt; &gt; &nbsp;<br>&gt; &gt; &gt; -- Angelos TzotsosRemote Sensing LaboratoryNational Technical University of Athenshttp://users.ntua.gr/tzotsos<br>&gt; &gt; &gt;  <br>&gt; &gt; &gt; &nbsp;<br>&gt; &gt; &gt; -- Angelos TzotsosRemote Sensing LaboratoryNational Technical University of Athenshttp://users.ntua.gr/tzotsos<br>&gt; &gt; &gt; ------------------------------------------------------------------------------<br>&gt; &gt; &gt; Virtualization &amp; Cloud Management Using Capacity Planning<br>&gt; &gt; &gt; Cloud computing makes use of virtualization - but cloud computing <br>&gt; &gt; &gt; also focuses on allowing computing to be delivered as a service.<br>&gt; &gt; &gt; http://www.accelacomm.com/jaw/sfnl/114/51521223/<br>&gt; &gt; &gt; _______________________________________________<br>&gt; &gt; &gt; pycsw-devel mailing list<br>&gt; &gt; &gt; pycsw-devel@lists.sourceforge.net<br>&gt; &gt; &gt; https://lists.sourceforge.net/lists/listinfo/pycsw-devel                                               <br>&gt; &gt;                                                <br>&gt;                                                <br></div>                                               </div></body>
</html>