DotNet Proxy Export Image Path with POST

361
0
11-13-2019 08:35 AM
JoeTavano1
New Contributor

We have an issue where a post call to a export a map image using the DotNet proxy is returning the wrong path.  Basically the "href" property returned is using the proxy domain rather than the map service domain which results in the application not being able to find the image.

Example

The app will make the call (POST) which gets routed through the proxy like so:

https://<appurl>/proxy/proxy.ashx?https://<mapserviceurl>/server/rest/services/<mapservicefolder>/<mapservice>/MapServer/export?

The image gets created on the server correctly, but the "href" property in the returned JSON output uses the domain of the application (appurl) instead of the domain of the map service (mapserviceurl)

{  "href": "https://<appurl>/server/rest/directories/arcgisoutput/<mapservicefolder>/<mappservice>_MapServer/_ags_mapd47c9ed8e69d40ba8b1b32b510c0a2e7.png",   "width": 1060,   "height": 751,   "extent": {     "xmin": -11111111.158558,     "ymin": 11111111.0506628,     "xmax": -1111111.1588419,     "ymax": 11111111.3825372,     "spatialReference": {       "wkid": 102333,       "latestWkid": 3333     }   },   "scale": 4622324.434309 }

The "href" value should be "https://<mapservieurl>/server/rest/directories/arcgisoutput/<mapservicefolder>/<mappservice>_MapServer/_ags_mapd47c9ed8e69d40ba8b1b32b510c0a2e7.png".

Is there any way to when going through the proxy to have the "href" out path respect the map service domain?
Tags (2)
0 Kudos
0 Replies