I am publishing a local ArcGIS Server Map service using ArcPy script (script follows below) (running on that very server).
Every time I call arcpy.UploadServiceDefinition_server() arcgis online sign in dialog box pops up and execution is paused until I reject to sign in.
While acceptable in interactive mode, this totally prohibits running the script in unattended mode.
How can I disable the dialog and why does it pop up at all?
Server version 10.2.2, layers in the mxd have a registered connection to SQL geodatabase. Publishing from ArcMap works OK with no errors or warnings.
Attachment 34171
Every time I call arcpy.UploadServiceDefinition_server() arcgis online sign in dialog box pops up and execution is paused until I reject to sign in.
While acceptable in interactive mode, this totally prohibits running the script in unattended mode.
How can I disable the dialog and why does it pop up at all?
Server version 10.2.2, layers in the mxd have a registered connection to SQL geodatabase. Publishing from ArcMap works OK with no errors or warnings.
Code:
arcpy.mapping.CreateGISServerConnectionFile("PUBLISH_GIS_SERVICES",
outDir,
outName,
serverUrl,
"ARCGIS_SERVER",
False,
outDir,
usr,
pwd,
"SAVE_USERNAME")
arcpy.mapping.CreateMapSDDraft(mapDoc, sddraft, service, 'ARCGIS_SERVER', outName, False, None, 'summary', 'tags')
arcpy.StageService_server(sddraft, sd)
arcpy.UploadServiceDefinition_server(sd, outName)