POST
|
UPDATE I had to delete the WebUpdate.sd and WebUpdate.sddraft files. The script wasn't able to overwrite those 2 files for some reason. If anyone has ideas to why that might be the case that would be great to know. Hi, I changed the relPath = r"C:\GIVE_A_FILE_DIRECTORY" to a local folder and still getting this error. Creating SD file Traceback (most recent call last): File "C:/ScheduledScripts/TRC/updatewebmap1.py", line 33, in <module> arcpy.mp.CreateWebLayerSDDraft(mp, sddraft, sd_fs_name, 'MY_HOSTED_SERVICES', 'FEATURE_ACCESS','', True, True) File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\mp.py", line 105, in CreateWebLayerSDDraft return _convertArcObjectToPythonObject(arcgisscripting._mapping.CreateWebLayerSDDraft(*_gp_fixargs([map_or_layers, out_sddraft, service_name, server_type, service_type, folder_name, overwrite_existing_service, copy_data_to_server, enable_editing, allow_exporting, enable_sync, summary, tags, description, credits, use_limitations], True))) RuntimeError >>> The script was working for over a year until last month. Only change is updating ArcPro to 2.7.1. I successfully overwrote the layer manually through ArcPro. Any insight would be great. import arcpy import os, sys from arcgis.gis import GIS ### Start setting variables # Set the path to the project prjPath = r"Path of aprx" # Update the following variables to match: # Feature service/SD name in arcgis.com, user/password of the owner account sd_fs_name = "NAME OF LAYER" portal = "NAME OF PORTAL" # Can also reference a local portal user = "NAME OF USER" password = "PASSWORD" # Set sharing options shrOrg = False shrEveryone = False shrGroups = "Group" ### End setting variables # Local paths to create temporary content relPath = r"C:\ScheduledScripts\TRC" sddraft = os.path.join(relPath, "WebUpdate.sddraft") sd = os.path.join(relPath, "WebUpdate.sd") # Create a new SDDraft and stage to SD print("Creating SD file") arcpy.env.overwriteOutput = True prj = arcpy.mp.ArcGISProject(prjPath) mp = prj.listMaps()[0] arcpy.mp.CreateWebLayerSDDraft(mp, sddraft, sd_fs_name, 'MY_HOSTED_SERVICES', 'FEATURE_ACCESS','', True, True) arcpy.StageService_server(sddraft, sd) print("Connecting to {}".format(portal)) gis = GIS(portal, user, password) # Find the SD, update it, publish /w overwrite and set sharing and metadata print("Search for original SD on portal…") sdItem = gis.content.search("{} AND owner:{}".format(sd_fs_name, user), item_type="Service Definition")[0] print("Found SD: {}, ID: {} n Uploading and overwriting…".format(sdItem.title, sdItem.id)) sdItem.update(data=sd) print("Overwriting existing feature service…") fs = sdItem.publish(overwrite=True) if shrOrg or shrEveryone or shrGroups:print("Setting sharing options…") fs.share(org=shrOrg, everyone=shrEveryone, groups=shrGroups) print("Finished updating: {} – ID: {}".format(fs.title, fs.id))
... View more
04-30-2021
08:51 AM
|
0
|
0
|
3345
|
POST
|
I checked this before and there were no token parameters included in the service URL in the request from the print service.
... View more
06-11-2020
08:01 AM
|
0
|
2
|
1417
|
POST
|
I published from ArcGIS Pro. I also tried the service installed with the server to no avail, but that is to be expected, right?
... View more
06-11-2020
07:44 AM
|
0
|
1
|
1465
|
POST
|
The security on the GIS server is managed by Portal and the Portal security is Enterprise Login via SAML using an identity provider. The GIS server is federated with the Portal and hosts the map services and the custom print service. The Authentication Tier for the Server is the ARCGIS_PORTAL not through the web adapter on the server. From what I can tell everything is configured as described in the link above.
... View more
06-10-2020
06:03 AM
|
0
|
8
|
1417
|
POST
|
It doesn’t appear that the Web_Map_as_JSON request contains tokens. Security is SAML through the Portal. I “think” this was working before the upgrade to 10.8 but honestly hadn’t looked in awhile.
... View more
06-09-2020
09:18 AM
|
0
|
10
|
1417
|
POST
|
Yes we have Portal too. I upgraded to 10.8 over the weekend. The map services and custom print service all reside on the same server which is federated with the Portal. Everything appears to be configured correctly and I can print webmaps without secured services. What is the easiest way to check to see if the webmap_as_json contains tokens?
... View more
06-09-2020
07:47 AM
|
0
|
12
|
1417
|
POST
|
Any news on this issue? I have Enterprise 10.8 and have not been able to print secured services with a custom print service.
... View more
06-09-2020
06:54 AM
|
0
|
14
|
2559
|
BLOG
|
Did any of the list options referenced above get implemented?
... View more
09-23-2019
01:04 PM
|
0
|
0
|
19696
|
Online Status |
Offline
|
Date Last Visited |
08-13-2021
11:02 AM
|