I'm quite confused on how to get this proxy working.
I've secured one geoprocessing service called Habitat Management. It is located in the HabitatManagement folder, the service is titled HabitatManagement, and it contains a geoprocessing task called HabitatManagement. Essentially, the url for the secured service looks like this:
The actual web mapping application resides inside of a .NET application. The URL of the .NET application is this:
The actual web map url is this:
I have my proxy config file set up like so:
I have the proxy JS code like this:
If I go to the proxy page following this URL:
It works as expected, it says "Config File: "OK" Log File: "OK""
When I test this URL, it takes me to the HabitatManagement folder but does not show the services within it, even though the token should be passing the username and password so I can see the services, right? That's issue #1 that I don't understand.
Additionally, when I go the web map and try to access the service, it still makes me login with this message:
Please sign in to access the item on https://www.mydomain.com/myServer (HabitatManagement/HabitatManagement)
If I login, things work fine - it appears the token is generated and appended to the URL as it should be.
If I change the config file serverURL to this (note the extra "HabitatManagement" on the end of the URL):
and try this URL, the request fails with "Bad Request" error:
and if I test it in the application it still prompts me to login with the same message as before.
I have also tried to change my serverURL to something very general with no luck. Ideally, the serverURL would be more specific than this as there are some services we have that don't require authentication thus do not need to run through a proxy.
I'm not sure if my proxy is located in the wrong spot, or if my referrer URL is messed up, or if my serverURLs are messed up. How do I access my secured services using the proxy?