Hello,
I have a map service published on my ArcGIS Server (10.8.1) and the service is secured using the tools within Server Manager. I mainly use this service in JavaScript APIs making use of addProxyRule to pass all the map requests through a proxy page containing the necessary credentials. This works great.
I now want to be able to make requests to the same secured service (which is WMS enabled) to return .png images. I have a third-party application that needs to consume the map as WMS. At the moment this third-party application is using an unsecured WMS service and can successfully make requests a bit like this:
https://myServer/arcgis/services/MyService/MapServer/WMSServer?VERSION=1.3.0&REQUEST=Getmap&CRS=EPSG:27700&BBOX=1000,1000,1100,1100&WIDTH=256&HEIGHT=256&LAYERS=0,2,3,4&STYLES=&FORMAT=image/png
As expected, if I change the service name from MyService to MySecuredService I get a forbidden message. I have tried creating a URL which is prefixed with my proxy page location like this:
https://myServer/proxy.ashx?https://myServer/arcgis/services/MySecuredService/MapServer/WMSServer?VERSION=1.3.0&REQUEST=Getmap&CRS=EPSG:27700&BBOX=1000,1000,1100,1100&WIDTH=256&HEIGHT=256&LAYERS=0,2,3,4&STYLES=&FORMAT=image/png
But this doesn’t work, either by design or because I’m doing it wrong, but making requests from a JS API to the ESRI REST endpoint of the secured service works through this proxy page, just not doing WMS by entering the URL in a web browser to test. The unsecured service WMS map request works fine by testing the URL in a web browser.
Can anyone please help by explaining how I can get this third-part application to make WMS map image requests to the secured service? There is very limited scope for modifying the third-party application, it simply has a config file where I can enter the base service URL for it to make the requests which is why I was hoping simply adding the proxy page to the start of the URL would work. I have also tried hosting the proxy page with the application and on the ArcGIS Server server, and I’ve tested the allowedReferers isn’t an issue.
Thank you,
Mark.