<?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: ArcPy script called from ASP.net Service ERROR (Python3). Not Signed into Portal in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-script-called-from-asp-net-service-error/m-p/799669#M2004</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I&amp;nbsp;think you might have to actually run&amp;nbsp;Pro once as the&amp;nbsp;user that will&amp;nbsp;run your&amp;nbsp;script. I remember something like that I had to do&amp;nbsp;recently.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Feb 2020 21:56:51 GMT</pubDate>
    <dc:creator>Arne_Gelfert</dc:creator>
    <dc:date>2020-02-07T21:56:51Z</dc:date>
    <item>
      <title>ArcPy script called from ASP.net Service ERROR (Python3). Not Signed into Portal</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-script-called-from-asp-net-service-error/m-p/799668#M2003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Any help would be much appreciated...... &lt;A href="https://community.esri.com/migrated-users/337832"&gt;Shane Buscher&lt;/A&gt;&amp;nbsp;&amp;amp; &lt;A href="https://community.esri.com/migrated-users/339735"&gt;Arne Gelfert&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When attempting to run a python 3 script, that imports arcpy, from an asp.net service, I am receiving the following runtime error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&lt;EM&gt;File "C:\UploadWindsCurrents.py", line 13, in &amp;lt;module&amp;gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;EM style="font-size: 13px; "&gt;import arcpy&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 13px; "&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py", line 74, in &amp;lt;module&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 13px; "&gt;from arcpy.geoprocessing import gp&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 13px; "&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in &amp;lt;module&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 13px; "&gt;from ._base import *&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 13px; "&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 14, in &amp;lt;module&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 13px; "&gt;import arcgisscripting&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 13px; "&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgisscripting\__init__.py", line 1, in &amp;lt;module&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 13px; "&gt;from ._arcgisscripting import *&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="color: #ff0000; font-size: 13px; "&gt;RuntimeError: Not signed into Portal.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: #000000;"&gt;The script runs fine when I run it through command prompt, either specifying the propy.bat or the python3 interpreter.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: #000000;"&gt;&amp;nbsp;eg:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; color: #000000; font-family: 'courier new', courier, monospace;"&gt;"C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\propy.bat" C:\UploadWindsCurrents.py scenario currentsdir windsdir&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: #000000;"&gt;I understand that when running a python script in the 3.x when importing arcpy it verifies that the install of ArcGIS Pro is licensed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: #000000;"&gt;Based on other articles I have tried the following with no success...&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 15px; color: #000000;"&gt;Licensed ArcGIS Pro for offline use&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 15px; color: #000000;"&gt;Ensured that the asp.net service is running under the same account that ArcGIS pro is installed and licensed&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: #000000;"&gt;references:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: #000000;"&gt;&lt;A href="https://community.esri.com/thread/224231"&gt;ArcPy fails to import when not logged into host machine&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: #000000;"&gt;&lt;A class="link-titled" href="https://gis.stackexchange.com/questions/238985/avoiding-arcgisscripting-runtimeerror-not-signed-into-portal-from-arcpy-with-ar" title="https://gis.stackexchange.com/questions/238985/avoiding-arcgisscripting-runtimeerror-not-signed-into-portal-from-arcpy-with-ar"&gt;Avoiding arcgisscripting RuntimeError: Not signed into Portal from ArcPy with ArcGIS Pro? - Geographic Information Syste…&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: #000000;"&gt;Thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: #000000;"&gt;James&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM style=": ; color: #0000ff; font-size: 15px; "&gt;As a note, I have successfully run a 2.x python script from the asp.net service so the issue is definitely with python 3.x and obtaining&amp;nbsp;a license.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2020 02:33:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-script-called-from-asp-net-service-error/m-p/799668#M2003</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-02-06T02:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPy script called from ASP.net Service ERROR (Python3). Not Signed into Portal</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-script-called-from-asp-net-service-error/m-p/799669#M2004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I&amp;nbsp;think you might have to actually run&amp;nbsp;Pro once as the&amp;nbsp;user that will&amp;nbsp;run your&amp;nbsp;script. I remember something like that I had to do&amp;nbsp;recently.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2020 21:56:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-script-called-from-asp-net-service-error/m-p/799669#M2004</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2020-02-07T21:56:51Z</dc:date>
    </item>
  </channel>
</rss>

