<?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 Re: Unable to run Python scripts through IIS Server in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/unable-to-run-python-scripts-through-iis-server/m-p/1564116#M73267</link>
    <description>&lt;P&gt;While ArcGIS Desktop/ArcMap was licensed at the machine level, HKEY_LOCAL_MACHINE (HKLM), ArcGIS Pro is licensed at the user level, HKEY_CURRENT_USER (HKCU).&amp;nbsp; The ArcGIS Pro license for a user &lt;U&gt;can&lt;/U&gt; inherit from a machine-level setting if configured correctly before the user ever launches ArcGIS Pro, but it gets a little trickier once a user has launched ArcGIS Pro at least once, which is the case here.&lt;/P&gt;&lt;P&gt;I have mentioned "user" multiple times, that is because what is important isn't what settings you have for Pro when logged into the IIS server but what settings the credentials running IIS or IIS application pools have for ArcGIS Pro.&amp;nbsp; Since you have not provided any details about your IIS and application configuration, I can't offer any specifics.&amp;nbsp; Your issue is in the registry.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2024 15:45:08 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2024-12-03T15:45:08Z</dc:date>
    <item>
      <title>Unable to run Python scripts through IIS Server</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-run-python-scripts-through-iis-server/m-p/1563434#M73257</link>
      <description>&lt;P&gt;Hello everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to run the webpage using IIS server where users will run the Python scripts from the website. For instance, my website is hosted through IIS, forester can go into one of the webpage and then according to his needs program will start running a calculation process, python file will work in the backend and then display the results.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But in this process I am facing a problem saying arcgis pro license is not initialized.&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__in&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PrayagShah_1-1732894221294.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120602iA8B8454C0DDDC433/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PrayagShah_1-1732894221294.png" alt="PrayagShah_1-1732894221294.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "\\my_server_name\GIS_SSD\python_scripts\Culvert_Size_107a.py", line 21, in &amp;lt;module&amp;gt;&lt;BR /&gt;import arcpy&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py", line 77, in &amp;lt;module&amp;gt;&lt;BR /&gt;from arcpy.geoprocessing import gp&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in &amp;lt;module&amp;gt;&lt;BR /&gt;from ._base import *&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 14, in &amp;lt;module&amp;gt;&lt;BR /&gt;import arcgisscripting&lt;BR /&gt;File "E:\ArcGISPro_Python\Python\envs\arcgispro-py3\Lib\site-packages\arcgisscripting\__init__.py", line 131, in &amp;lt;module&amp;gt;&lt;BR /&gt;from ._arcgisscripting import *&lt;BR /&gt;RuntimeError: The Product License has not been initialized.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;However, when I run the same script through the ArcGIS Pro command prompt, it works fine. According to the ArcGIS Pro License Manager, the License Server Status shows "Running" and "Authorized". I have ensured that the application pool for my &lt;STRONG&gt;ArcGIS ProPython.exe file/folder&lt;/STRONG&gt; has the proper security rights (using .NET v4.8 Classic). This is the pool I created in IIS Manager.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PrayagShah_0-1732894195890.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120601i44D39CFD535CA0E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PrayagShah_0-1732894195890.png" alt="PrayagShah_0-1732894195890.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PrayagShah_2-1732894238610.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120603i86E34683B2A21E63/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PrayagShah_2-1732894238610.png" alt="PrayagShah_2-1732894238610.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I don't understand why the python scripts work fine through the command prompt but do not work through the website.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the Python script it generates from the website and works fine locally:&amp;nbsp;E:\ArcGISPro_Python\Python\envs\arcgispro-py3\python.exe \\my_servername.com\GIS_SSD\python_scripts\Culvert_Size_107a.py "2439099.12109375 7616263.95670573" "Culvert_Size_107a.py "2439099.12109375 7616263.95670573""&lt;/P&gt;&lt;P&gt;In my .NET code I have also mentioned the valid python path as shown below&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PrayagShah_3-1732894666993.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120604iC80C70D79E4C6825/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PrayagShah_3-1732894666993.png" alt="PrayagShah_3-1732894666993.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any suggestion you all think of? Thank you in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2024 15:38:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-run-python-scripts-through-iis-server/m-p/1563434#M73257</guid>
      <dc:creator>PrayagShah</dc:creator>
      <dc:date>2024-11-29T15:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run Python scripts through IIS Server</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-run-python-scripts-through-iis-server/m-p/1563533#M73258</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/816642"&gt;@PrayagShah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Have you tried executing this from the website, by keeping an open instance of ArcGIS Pro?&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2024 06:26:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-run-python-scripts-through-iis-server/m-p/1563533#M73258</guid>
      <dc:creator>Yogesh_Chavan</dc:creator>
      <dc:date>2024-12-01T06:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run Python scripts through IIS Server</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-run-python-scripts-through-iis-server/m-p/1563808#M73264</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/729377"&gt;@Yogesh_Chavan&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I did it by keeping the ArcGIS Open but no luck... same error.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I found one more error that when I open the Python notebook in arcgis pro, I get a message saying " &lt;STRONG&gt;Failed to create notebook server&lt;/STRONG&gt;".&amp;nbsp;&lt;/P&gt;&lt;P&gt;My configuration of this whole thing is like ArcGIS Enterprise 11.3 &amp;gt; Installed ArcGIS Pro &amp;gt; Python environment under&amp;nbsp;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 19:18:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-run-python-scripts-through-iis-server/m-p/1563808#M73264</guid>
      <dc:creator>PrayagShah</dc:creator>
      <dc:date>2024-12-02T19:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run Python scripts through IIS Server</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-run-python-scripts-through-iis-server/m-p/1563975#M73265</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/816642"&gt;@PrayagShah&lt;/a&gt;&amp;nbsp;, have you tried doing this in a cloned environment?&lt;/P&gt;&lt;P&gt;Which version of ArcGIS Pro are you using? Does the failed to open notebooks in Pro is happening for this version of Pro or have been unnoticed yet?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 04:08:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-run-python-scripts-through-iis-server/m-p/1563975#M73265</guid>
      <dc:creator>Yogesh_Chavan</dc:creator>
      <dc:date>2024-12-03T04:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run Python scripts through IIS Server</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-run-python-scripts-through-iis-server/m-p/1564116#M73267</link>
      <description>&lt;P&gt;While ArcGIS Desktop/ArcMap was licensed at the machine level, HKEY_LOCAL_MACHINE (HKLM), ArcGIS Pro is licensed at the user level, HKEY_CURRENT_USER (HKCU).&amp;nbsp; The ArcGIS Pro license for a user &lt;U&gt;can&lt;/U&gt; inherit from a machine-level setting if configured correctly before the user ever launches ArcGIS Pro, but it gets a little trickier once a user has launched ArcGIS Pro at least once, which is the case here.&lt;/P&gt;&lt;P&gt;I have mentioned "user" multiple times, that is because what is important isn't what settings you have for Pro when logged into the IIS server but what settings the credentials running IIS or IIS application pools have for ArcGIS Pro.&amp;nbsp; Since you have not provided any details about your IIS and application configuration, I can't offer any specifics.&amp;nbsp; Your issue is in the registry.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 15:45:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-run-python-scripts-through-iis-server/m-p/1564116#M73267</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2024-12-03T15:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run Python scripts through IIS Server</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-run-python-scripts-through-iis-server/m-p/1564676#M73274</link>
      <description>&lt;P&gt;Hi Joshua,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you’re right; the issue was related to IIS permissions. What I did was move the ArcGIS Pro python.exe folder to a different location, then granted permissions to the Application Pool. In the Security list, I also granted permission to IIS_WPG as well.&amp;nbsp; Now, I can access the Python scripts through the web without any issues.&lt;/P&gt;&lt;P&gt;Thank you everyone for the valuable feedback.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 15:19:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-run-python-scripts-through-iis-server/m-p/1564676#M73274</guid>
      <dc:creator>PrayagShah</dc:creator>
      <dc:date>2024-12-04T15:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run Python scripts through IIS Server</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-run-python-scripts-through-iis-server/m-p/1662679#M74832</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/816642"&gt;@PrayagShah&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hello everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;I&lt;/U&gt;&lt;U&gt;&lt;FONT color="#3366FF"&gt; a&lt;/FONT&gt;m trying to run the webpage using IIS server where users will run the Python scripts from the website. For instance, my website is hosted through IIS, forester can go into one of the webpage and then according to his needs program will start running a calculation process, python file will work in the backend and then display the results.&amp;nbsp;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;But in this process I am facing a problem saying arcgis pro license is not initialized.&amp;nbsp;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;import arcpy&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__in&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PrayagShah_1-1732894221294.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120602iA8B8454C0DDDC433/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PrayagShah_1-1732894221294.png" alt="PrayagShah_1-1732894221294.png" /&gt;&lt;/span&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;Traceback (most recent call last):&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;File "\\my_server_name\GIS_SSD\python_scripts\Culvert_Size_107a.py", line 21, in &amp;lt;module&amp;gt;&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;import arcpy&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py", line 77, in &amp;lt;module&amp;gt;&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;from arcpy.geoprocessing import gp&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in &amp;lt;module&amp;gt;&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;from ._base import *&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 14, in &amp;lt;module&amp;gt;&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;import arcgisscripting&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;File "E:\ArcGISPro_Python\Python\envs\arcgispro-py3\Lib\site-packages\arcgisscripting\__init__.py", line 131, in &amp;lt;module&amp;gt;&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;from ._arcgisscripting import *&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;RuntimeError: The Product License has not been initialized.&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;However, when I run the same script through the ArcGIS Pro command prompt, it works fine. According to the ArcGIS Pro License Manager, the License Server Status shows "Running" and "Authorized". I have ensured that the application pool for my &lt;STRONG&gt;ArcGIS ProPython.exe file/folder&lt;/STRONG&gt; has the proper security rights (using .NET v4.8 Classic). This is the pool I created in IIS Manager.&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PrayagShah_0-1732894195890.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120601i44D39CFD535CA0E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PrayagShah_0-1732894195890.png" alt="PrayagShah_0-1732894195890.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PrayagShah_2-1732894238610.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120603i86E34683B2A21E63/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PrayagShah_2-1732894238610.png" alt="PrayagShah_2-1732894238610.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;I don't understand why the python scripts work fine through the command prompt but do not work through &lt;/U&gt;&lt;/FONT&gt;&lt;A href="http://thetexasroadhousemenu.com/" target="_self"&gt;this website&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;This is the Python script it generates from the website and works fine locally:&amp;nbsp;E:\ArcGISPro_Python\Python\envs\arcgispro-py3\python.exe \\my_servername.com\GIS_SSD\python_scripts\Culvert_Size_107a.py "2439099.12109375 7616263.95670573" "Culvert_Size_107a.py "2439099.12109375 7616263.95670573""&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;In my .NET code I have also mentioned the valid python path as shown below&amp;nbsp;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PrayagShah_3-1732894666993.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120604iC80C70D79E4C6825/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PrayagShah_3-1732894666993.png" alt="PrayagShah_3-1732894666993.png" /&gt;&lt;/span&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;U&gt;Is there any suggestion you all think of? Thank you in advance.&amp;nbsp;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I am also encountering the same issue. I’ve been trying to run Python scripts that depend on ArcGIS Pro from a website hosted on IIS, and everything works perfectly when executed directly from the ArcGIS Pro command prompt — but once I trigger the same script through IIS, it throws the same “RuntimeError: The Product License has not been initialized” error.&lt;/P&gt;&lt;P&gt;Like you, my ArcGIS Pro License Manager shows that the server is running and authorized, and I’ve already verified the permissions for the IIS application pool, set it to use the correct Python environment path, and ensured access rights to the Python and script directories. Still, the Python process seems unable to detect or initialize the ArcGIS license under IIS.&lt;/P&gt;&lt;P&gt;I’m starting to wonder if the issue has to do with the IIS application pool running under a user that isn’t properly licensed or doesn’t have access to the ArcGIS licensing environment variables. It’s strange because all other configurations seem right, yet ArcGIS doesn’t initialize unless the script is launched manually.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 19:06:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-run-python-scripts-through-iis-server/m-p/1662679#M74832</guid>
      <dc:creator>KimKorton</dc:creator>
      <dc:date>2025-11-05T19:06:25Z</dc:date>
    </item>
  </channel>
</rss>

