<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Python over CGI on IIS in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-over-cgi-on-iis/m-p/404185#M31834</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I have configure python to work over CGI on iis,&lt;/P&gt;&lt;P&gt;I got the script to work, but on top of it working relay slow , I keep getting some extra information when executing arcpy functions.&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;arcpy.FeatureClassToGeodatabase_conversion(Input_Features, msurvey_rashutnew_sde)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;returns&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;\\serverName\SurveyData\Survey_Template_3.gdb\PNT_TMP_3 Successfully converted: \\serverName\PythonApp\msurvey@rashutnew.sde\PNT_TMP_3&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;so my script returns&amp;nbsp;"invalid haderes".&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;is there another way to run python with arcpay on web page ?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;thanks&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;iris&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Jun 2017 14:20:46 GMT</pubDate>
    <dc:creator>irishadar</dc:creator>
    <dc:date>2017-06-12T14:20:46Z</dc:date>
    <item>
      <title>Python over CGI on IIS</title>
      <link>https://community.esri.com/t5/python-questions/python-over-cgi-on-iis/m-p/404185#M31834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I have configure python to work over CGI on iis,&lt;/P&gt;&lt;P&gt;I got the script to work, but on top of it working relay slow , I keep getting some extra information when executing arcpy functions.&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;arcpy.FeatureClassToGeodatabase_conversion(Input_Features, msurvey_rashutnew_sde)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;returns&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;\\serverName\SurveyData\Survey_Template_3.gdb\PNT_TMP_3 Successfully converted: \\serverName\PythonApp\msurvey@rashutnew.sde\PNT_TMP_3&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;so my script returns&amp;nbsp;"invalid haderes".&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;is there another way to run python with arcpay on web page ?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;thanks&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;iris&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2017 14:20:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-over-cgi-on-iis/m-p/404185#M31834</guid>
      <dc:creator>irishadar</dc:creator>
      <dc:date>2017-06-12T14:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Python over CGI on IIS</title>
      <link>https://community.esri.com/t5/python-questions/python-over-cgi-on-iis/m-p/404186#M31835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have any input on your workflow, but have you looked into a &lt;A href="http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-geoprocessing-service-.htm"&gt;GP service&lt;/A&gt;? &amp;nbsp;If you have ArcGIS Server you could create your own GP service so you can run geoprocessing tasks through the web.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2017 19:13:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-over-cgi-on-iis/m-p/404186#M31835</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2017-06-12T19:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Python over CGI on IIS</title>
      <link>https://community.esri.com/t5/python-questions/python-over-cgi-on-iis/m-p/404187#M31836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jonathan Quinn Hi,&lt;/P&gt;&lt;P&gt;thank you for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are familiar with GP services and use quit a lot for many purposes, but I don’t think It will work for this workflow, I would be happy to know what you think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Our workflow needs to automate creating new WebMap to be used in a Collector, with new uniquely named editable layer coming from SDE, based on FGDB templated.&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is our workflow steps, each represents working python script. For all them to work together I wanted to use html page which will invoke each of them separately:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 1. Copy empty FGDB containing domains and subtype to Oracle SDE.&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;Create global Id, attachments and archiving on the new layer using arcpy.&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;2. Create feature service from that layer on ArcGis Server using arcpy.&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;3. Since there is no other why to add feature access to service, this step is adding it through modifying Json of the service using "rest api ".&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;4. Creating item in " ArcGIs online" from that service and WebMap using that item , all to be used&amp;nbsp; in ArcGIs collector. this part is using new python api.&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;&lt;/P&gt;&lt;P&gt;So… we were almost there except that massage from python announcing its success, which I really don’t know where it is coming from.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d; border: none windowtext 1.0pt; padding: 0cm; background: white;"&gt;\serverName\SurveyData\Survey_Template_3.gdb\PNT_TMP_3 Successfully converted: \\serverName\PythonApp\msurvey@rashutnew.sde\PNT_TMP_3&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Best regrades,&lt;/P&gt;&lt;P&gt;iris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2017 20:28:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-over-cgi-on-iis/m-p/404187#M31836</guid>
      <dc:creator>irishadar</dc:creator>
      <dc:date>2017-06-12T20:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Python over CGI on IIS</title>
      <link>https://community.esri.com/t5/python-questions/python-over-cgi-on-iis/m-p/404188#M31837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you clarify the following two points?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0px 18pt;"&gt;2. Create feature service from that layer on ArcGis Server using arcpy.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0px 18pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0px 18pt;"&gt;3. Since there is no other why to add feature access to service, this step is adding it through modifying Json of the service using "rest api ".&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0px 18pt;"&gt;&lt;/P&gt;&lt;P&gt;Using the &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/createmapsddraft.htm"&gt;CreateMapSDDraft&lt;/A&gt; tool, you're able to modify the sddraft to enable the feature access capability. &amp;nbsp;When you stage the SD file and then upload it, the resulting service will have feature access enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In regards to running them through an HTML page, is that so you can start the process from anywhere?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 16:25:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-over-cgi-on-iis/m-p/404188#M31837</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2017-06-13T16:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Python over CGI on IIS</title>
      <link>https://community.esri.com/t5/python-questions/python-over-cgi-on-iis/m-p/404189#M31838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d; background: white;"&gt;Hi Jonathan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d; background: white;"&gt;I’ve used two steps for getting a “feature service” because I couldn’t modify the “SDDraft” to add “feature Access” to it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d; background: white;"&gt;I followed the “Modify SDDraft example 4” and try to enable “FeatureServer”, it didn’t work , so I went ahead and modified it through rest.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d; background: white;"&gt;In regards to the use of one html page, it is needed since this workflow is part of a big “Javascript api” application.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d; background: white;"&gt;This is the script I &amp;nbsp;used.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; xml&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dom&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;minidom &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; DOM
wrkspc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"c:\\SurveyData\\"&lt;/SPAN&gt;
mxd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"C:\SurveyData\temp.mxd"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
mxd&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;saveACopy&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"c:\SurveyData\testing1.mxd"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; mxd&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;filePath
inFC &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Database Connections\\msurvey@rashutnew.sde\\MSURVEY.PNT_TMP_1"&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeFeatureLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inFC&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"TestData"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
mxd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"c:\SurveyData\testing.mxd"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
df &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListDataFrames&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
lyrLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Layer&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"TestData"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddLayer&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;df&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lyrLayer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"AUTO_ARRANGE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;##mxd.save()&lt;/SPAN&gt;
mxd&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;saveACopy&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"c:\SurveyData\topublish1.mxd"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;del&lt;/SPAN&gt; mxd

con &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Database Connections\\arcgis on gis-develop (admin)"&lt;/SPAN&gt;
mapDoc&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"c:\SurveyData\topublish1.mxd"&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;### Provide other service details&lt;/SPAN&gt;
service &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'TestSurIris3'&lt;/SPAN&gt;
sddraft &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; wrkspc &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; service &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'.sddraft'&lt;/SPAN&gt;
sd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; wrkspc &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; service &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'.sd'&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; sd
summary &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'General reference map Test ssdraft'&lt;/SPAN&gt;
tags &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'TEST'&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Create service definition draft&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CreateMapSDDraft&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mapDoc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sddraft&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; service&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'ARCGIS_SERVER'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; con&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; summary&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; tags&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# The Server Object Extension (SOE) to enable.&lt;/SPAN&gt;
soe &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'FeatureServer'&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Read the sddraft xml.&lt;/SPAN&gt;
doc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; DOM&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;parse&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sddraft&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Find all elements named TypeName. This is where the server object extension (SOE) names are defined.&lt;/SPAN&gt;
typeNames &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; doc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getElementsByTagName&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'TypeName'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; typeName &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; typeNames&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;# Get the TypeName we want to disable.&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; typeName&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;firstChild&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;data &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; soe&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 extension &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; typeName&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;parentNode
 &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; extElement &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; extension&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;childNodes&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;# Disabled SOE.&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; extElement&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;tagName &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Disabled'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 extElement&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;firstChild&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;data &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'true'&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Output to a new sddraft.&lt;/SPAN&gt;
outXml &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; wrkspc &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'TestSurIris3ForWeb.sddraft'&lt;/SPAN&gt;
sd&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;wrkspc&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'TestSurIris3ForWeb.sd'&lt;/SPAN&gt;
f &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; open&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;outXml&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'w'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
doc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;writexml&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; f &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
f&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;close&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Analyze the service definition draft&lt;/SPAN&gt;
analysis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AnalyzeForSD&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;outXml&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Print errors, warnings, and messages returned from the analysis&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"The following information was returned during analysis of the MXD:"&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; key &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'messages'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'warnings'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'errors'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'----'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; key&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;upper&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'---'&lt;/SPAN&gt;
 vars &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; analysis&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;key&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;message&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; code&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; layerlist&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; vars&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;iteritems&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;' '&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; message&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;' (CODE %i)'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt; code
 &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;' applies to:'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; layer &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; layerlist&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Stage and upload the service if the sddraft analysis did not contain errors&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; analysis&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'errors'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;# Execute StageService. This creates the service definition.&lt;/SPAN&gt;
 arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;StageService_server&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;outXml&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sd&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Execute UploadServiceDefinition. This uploads the service definition and publishes the service.&lt;/SPAN&gt;
 arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UploadServiceDefinition_server&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sd&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; con&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Service successfully published"&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Service could not be published because errors were found during analysis."&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetMessages&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:25:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-over-cgi-on-iis/m-p/404189#M31838</guid>
      <dc:creator>irishadar</dc:creator>
      <dc:date>2021-12-11T18:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Python over CGI on IIS</title>
      <link>https://community.esri.com/t5/python-questions/python-over-cgi-on-iis/m-p/404190#M31839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I’ve figured out the problem in the script .&lt;/P&gt;&lt;P&gt;I seems that all “Server Object Extensions” are enabled by default , so , &amp;nbsp;you only have to turn the “firstChild.data” to true.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; extElement &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; extension&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;childNodes&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;# Disabled SOE.&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; extElement&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;tagName &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Enabled'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 extElement&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;firstChild&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;data &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'true'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don’t know if that is a bug or it’s supposed to be this way , but now it is working now(one script i can delete).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;STRONG style="color: #3d3d3d; font-size: 11.5pt;"&gt;Still My question stays the same, does anyone know why I am getting strange massage from python announcing its success?&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 7.5pt; background: #F6F6F6;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d; border: none windowtext 1.0pt; padding: 0cm; background: white;"&gt;\serverName\SurveyData\Survey_Template_3.gdb\PNT_TMP_3 Successfully converted: \\serverName\PythonApp\msurvey@rashutnew.sde\PNT_TMP_3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;iris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:25:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-over-cgi-on-iis/m-p/404190#M31839</guid>
      <dc:creator>irishadar</dc:creator>
      <dc:date>2021-12-11T18:25:26Z</dc:date>
    </item>
  </channel>
</rss>

