HTTP Error 407 #126
Comments
What type of Proxy do you have? |
I am working behind a corporate firewall, we have a corporate proxy to access Internet. I found I could not assess AGOL using REST API in Python, so that I installed a local proxy on my computer called "Cntlm" which is serving on port 3128. Code like the following will work if NOT using ArcREST:
|
@lucksimo - the issue with proxy support is that there are many different types of proxies. ArcREST supports simple proxies. You can try creating a local proxy on your machine that then handles the NTLM proxy needs. Just an idea. |
@achapkowski |
@lucksimo can you post your solution? All the steps to work around this issue? I think it would be a great wiki article as well because I'm sure there are other people who have this issue. Thank you |
sorry for the late response @achapkowski , I'v been tied up on some emergency stuff. Using a local proxy like cntml can help when using ArcREST behind enterprise proxy. It seems there is no way to explicitly input your windows credentials in some ArcREST functions although it allows users to provide proxy_url and proxy_port. Since local proxy saves the credentials in its config file, you don't need to provide the credentials with the proxy server name and port number, and it's safer, bonus. Here is a very good online article about installing cntml. Hope this can help people who have the same issue. |
@lucksimo - Thanks for posting this! I'm sure it will help lots of people. |
When I run the example code listLayersInHostedFeatureService.py, I get this error:
HTTPError: HTTP Error 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter
I have tried a few other example code, I got the same error .
the following code seems OK though, it doesn't cause any error when I step through it in debugging.
sh = arcrest.AGOLTokenSecurityHandler(myusername, mypassword, 'https://myorg.maps.arcgis.com/',None,'127.0.0.1',3128)
More details of my environment:
I am running the code behind a corporate proxy which is using NTLM authentication and causing trouble to work with some could services. so I am using Cntlm as a local proxy to mitigate the problem and it's been working for me to access AGOL.
The text was updated successfully, but these errors were encountered: