POST
|
I finally found a solution, after months of research with trial and error (mostly error). This solution is written in PHP using cURL. Step #1 Generate a token: $param = 'username=admin_user&password=admin_pass&client=ip&ip=10.10.10.15&f=json'; $url = 'https://domain.com:6443/arcgis/admin/generateToken'; $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $param); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL, $url); $result = curl_exec($ch); curl_close($ch); $obj = json_decode($result); $token = $obj->token; The IP address listed in the $param line is the IP address where the request originates from. Once you have the token you can use it to install the new certificate with another cURL call: Step #2 Install Certificate $pfx = <curl_file_create('/folder/to/your/cert.pfx'); $params = array('token' => $token,'certPassword' => '<cert password>', 'alias' => '<unique name>, 'certFile' => $pfx,'f' => 'json'); $url = 'https:/domain.com:6443/arcgis/admin/machines/MACHINE NAME/ sslcertificates/importExistingServerCertificate'; $ch = curl_init(); curl_setopt<($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, Array("multipart/form-data")); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL, $url); $res = curl_exec($ch); curl_close($ch); Replace <cert password> with the password for the PFX certificate and <unique name> with something other than what was previously installed - it's an alias name for the new certificate so you can easily tell which certificate in the cert store you want to assign to the machine. Of course, you will still have to make other API calls to assign the newly installed certificate into the machine and perhaps some other clean up tasks like deleting the old cert, but this worked for me! I hope someone will find it useful.
... View more
2 weeks ago
|
0
|
0
|
28
|
POST
|
v = ['a', 'c', 'b', 'd', None]
v*2 # --- just to show you can expand lists
['a', 'c', 'b', 'd', None, 'a', 'c', 'b', 'd', None]
v0 = v*1000000 # lets make one with 5 million values
# ---- As Joshua says, it isn't slow, and there is an `if` statement in the #
list comprehension
%timeit ' '.join([x for x in v0 if x is not None ])
217 ms ± 31.1 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
# ---- What about filter using the first 4 values agains `None`
' '.join(filter(None, v[:4]))
'a c b d'
# ---- no slouch either, and largely insignificant
%timeit ' '.join(filter(None, v0))
170 ms ± 8.33 ms per loop (mean ± std. dev. of 7 runs, 10 loops each) slow coding night 😉
... View more
2 weeks ago
|
3
|
0
|
135
|
POST
|
Even with ArcGIS Desktop/ArcMap, if you define a function with only a pass statement and nothing else, it will return None and then Calculate Field turns that None into a SQL NULL. Although Calculate Field does iterate over the records, your pass statement is in a function that is being called on each row and not within the loop itself. A Python function has to return something, either a value or an error. If you don't return something, then Python None is returned.
... View more
3 weeks ago
|
1
|
0
|
125
|
POST
|
I had the same issue and finally found the script to create sequential values NOT based on ObjectID but related to any other defined column here: https://mediaspace.esri.com/media/t/1_1fkt56w1
... View more
3 weeks ago
|
0
|
0
|
38
|
POST
|
Joshua, Thank you very much. That solved my issue and I have marked your note as a solution. I really appreciate your taking the time to help me out, especially late on a Friday night! Caitlin
... View more
3 weeks ago
|
0
|
0
|
156
|
POST
|
Thanks Martin! Using a field mapping object was the only working solution for appending to an sde feature class
... View more
3 weeks ago
|
0
|
0
|
41
|
POST
|
Just a minor follow-up on this; depending on the complexity of your feature (especially dense, un-simplified multipolygons), reducing the precision of the WKT could cause some vertices to become coincident, break topology, or otherwise create invalid geometries that will make your table un-selectable within the ArcGIS Pro GUI. I was dealing with some coastal polygons and this issue tripped me up and I ended up needing to move up to a precision 7 to negate the issue. Also, relevant XKCD: https://xkcd.com/2170/
... View more
3 weeks ago
|
0
|
0
|
72
|
POST
|
Sorry for the delay with an update, I was able to get the datasets updated. What I did was delete the old dataset folders and their contents, then re-create the empty dataset folders. And finally use the arcpy.management.CopyFeatures function for each feature layer in each dataset. It does take a long to run this update, but it does work so i will live with it. Thanks for all the suggestions!
... View more
3 weeks ago
|
0
|
0
|
83
|
POST
|
Same issue with Python the Field Type seems to vanish as a selection. I switch to Arcade which has helped. For your distinct issue, I used Add Field so that I can be specific of the Field Name, Field Alias, and Type, before I ran the next Calculate Field.
... View more
3 weeks ago
|
0
|
0
|
55
|
POST
|
This was the issue! I was passing in a complete sde path to the table into my SelectLayerByAttribute instead of just passing it the table name of the table I wanted to use, which was open in my ArcPro project!! Thank you very much.
... View more
4 weeks ago
|
0
|
0
|
100
|
POST
|
The issue was the result of incorrectly using edit.startEditing(False, True) As this table was not versioned, this caused the script to hang for a long period of time. To get this to work I should have done False, False.
... View more
4 weeks ago
|
1
|
0
|
70
|
POST
|
Atm the option for the automatic login is disabled, so i don't think this is the problem. Thank you anyway!
... View more
a month ago
|
0
|
0
|
108
|
POST
|
I wanted to add to this topic. I was having similar behavior. What I found was that I was using the etc/hosts file while migrating to a new server to map our production server alias to the local server. Initially, I entered the following: #.#.#.# alias.domain.com It worked for a lot of things like setting up the web adaptor. It didn't work once I got to setting up IWA. While troubleshooting, I tried using the machine name instead of the alias and IWA worked. So, I then tried modifying the etc/hosts file as follows: #.#.#.# machinename.domain.com alias.domain.com I'm not well-trained in networking so I don't know why leaving the machine name out of the entry caused an issue. I do know it fixed my problem.
... View more
a month ago
|
0
|
0
|
29
|
POST
|
Hi Joshua, I have not tried Update Cursor. I am a Python novice, but I may give it a try. Thank you for your help. Regards, Jay
... View more
a month ago
|
0
|
0
|
102
|
POST
|
Even if you have installed a valid SSL certificate, you should not delete the self-signed certificate from ArcGIS Server, Portal, or Data Store. Here's why. Fallback Option:- The self-signed certificate is used as a backup in case your genuine certificate fails. It provides basic functionality within your ArcGIS environment for troubleshooting purposes. Testing:- The self-signed certificate might be useful for testing your ArcGIS installation to ensure its functionality before setting a trusted certificate. While you do not have to delete the self-signed certificate, you should ensure that it is not the active certificate used for secure connections. Here's what you should do instead. Configure Valid Certificate:- To Configure ArcGIS Server, Portal, or the Data Store to utilize this certificate for safe connection after getting a valid SSL certificate from a reliable Certificate Authority Disable Self-Signed:- To avoid unintentional use, you can disable the self-signed certificate in certain ArcGIS versions. This isn't necessarily required, though, and it might not be included in every edition.
... View more
04-09-2024
02:32 AM
|
2
|
0
|
49
|
Title | Kudos | Posted |
---|---|---|
1 | Tuesday | |
2 | Monday | |
2 | a week ago | |
1 | a week ago | |
1 | 2 weeks ago |
Online Status |
Online
|
Date Last Visited |
yesterday
|