Hi All
I have a WAB 2.7 app (self deployed) that accesses a webmap with a secured arcgis server token service. The webamp will load correctly but the secure layer won't draw. Watching the network traffic, this makes sense b/c the 'export' image request to the service is NOT routed via the proxy.
Setup and things I can confirm:
"httpProxy": {
"alwaysUseProxy": false,
"url": "http://localhost/proxy.ashx",
"useProxy": true,
"rules": [
{
"urlPrefix": "https://streams.whitestar.com/arcgis/rest/services",
"proxyUrl": "http://localhost/proxy.ashx"
}
]
},
Network details
The WAB correctly uses the proxy when the webmap is loading and getting service/layer info. These request all return 200 success and the JSON is visible in the response preview:
locallhost/proxy.ashx?https://streams.whitestar.com/arcgis/rest/services/omnitrax/WS_Parcels_OMNITRAX/MapServer?f=json
locallhost/proxy.ashx?https://streams.whitestar.com/arcgis/rest/services/omnitrax/WS_Parcels_OMNITRAX/MapServer/layers?f=j...
locallhost/proxy.ashx?https://streams.whitestar.com/arcgis/rest/services/omnitrax/WS_Parcels_OMNITRAX/MapServer/0?f=json
locallhost/proxy.ashx?https://streams.whitestar.com/arcgis/rest/services/omnitrax/WS_Parcels_OMNITRAX/MapServer/1?f=json
locallhost/proxy.ashx?https://streams.whitestar.com/arcgis/rest/services/omnitrax/WS_Parcels_OMNITRAX/MapServer/2?f=json
The the layer list checkbox is clicked on, the following requests to export function are not routed thru the proxy and return the "token required" json instead of an image:
streams.whitestar.com/arcgis/rest/services/omnitrax/WS_Parcels_OMNITRAX/MapServer/export?dpi=96&transparent=true&format=png32&layers=show%3A0%2C1%2C2&bbox=-15859205.762025328%2C3291557.064882444%2C-6735682.065909116%2C7826413.078984177&bboxSR=102100&imageSR=102100&size=1865%2C927&f=image
What am missing?
Thanks
Solved! Go to Solution.
well.... long story short... if you run into this issue upgrading the jsapi version in the WAB (env.js) to 3.25 appears to fix it.
long story longer:
I created a few items to isolate out the various candidates
Trying various combinations, I found:
1. No issues either webmap (single secure service and multiple service) using 2.9 version
2. No issues using the single secure service using the 2.8 version
3. Issue repos with the multiple service webmap and the stock 2.8 WAB version.
The obvious difference in the 3.25 version of the javascript api and switching up to the new version seems to be resolving the issue. Going one step further, I took the 3.x 'Create webmap from id' sample, added in the proxy settings and tried both the single and multiple webmaps with both the 3.24 and 3.25 versions. I get the same results: both webmaps work with 3.25, only the single works with 3.24.
So it appears to be something in 3.24 - not WAB - with webmaps that have both secure and non-secure services running on HTTPS. Time for a beer.
Fred,
Http and Https requests are viewed as two different urls. So you have a rule for https. Is the request that is failing using http or https?
Hi Robert:
Both the "info" set and "export" set are HTTPS. I'll add an HTTP rule and see of that changes anything...
Adding the second HTTP rule doesn't help but try a few other things along those lines:
1. Setting all URLs (portal, proxy services, etc) to HTTPS --- still broke
2. Setting all URLs (portal, proxy services, etc) to HTTP --- WORKS!!! This is a pain b/c you have to open you're portal on HTTP to add the service as HTTP to the web map.
3. Leaving everything as it was mixed HTTPS but adding the service to the webmap as HTTP and setting the rule for the service as HTTP --- Works.
So somehow the "matching" function for the HTTPS export request is working correctly...
well.... long story short... if you run into this issue upgrading the jsapi version in the WAB (env.js) to 3.25 appears to fix it.
long story longer:
I created a few items to isolate out the various candidates
Trying various combinations, I found:
1. No issues either webmap (single secure service and multiple service) using 2.9 version
2. No issues using the single secure service using the 2.8 version
3. Issue repos with the multiple service webmap and the stock 2.8 WAB version.
The obvious difference in the 3.25 version of the javascript api and switching up to the new version seems to be resolving the issue. Going one step further, I took the 3.x 'Create webmap from id' sample, added in the proxy settings and tried both the single and multiple webmaps with both the 3.24 and 3.25 versions. I get the same results: both webmaps work with 3.25, only the single works with 3.24.
So it appears to be something in 3.24 - not WAB - with webmaps that have both secure and non-secure services running on HTTPS. Time for a beer.