Access Denied - esri.js
When trying to upload a zipped FGDB to an ArcGIS Online account, I'm getting the following:
Possibly unhandled Error: Access denied to perform the operation.
at Error (native)
at Object.f.load (http://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:755:426)
at http://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:182:69
at c (http://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:67:221)
at d (http://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:67:10)
at resolve.callback (http://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:68:350)
at c (http://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:67:436)
at d (http://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:67:10)
at resolve.callback (http://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:68:350)
at http://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:186:300
It's giving me an unknown error in the client, but it seems like it's not running some esri.js scripts due to forbidden access 403.
I have a feeling that it's a mixed content issue, but I can't confirm/deny it. Our application uses http, obviously site security/arcgis online authentication probably uses https. The data that is supposed to publish to the user's account, doesn't ever get to ArcGIS Online. It fails before this. Has anybody had any luck in uploading zipped FGDBs?
0
-
I have found that if I'm logged in as an account within the organization that controls our viewer, I get a different error:
"Unable to load proxy.ashx?https://vtanr.maps.arcgis.com/sharing/rest/content/users/vtanrgis/items/4746c2d60ee147aeb1b498dfe25b328e/status?f=json&token=gwqso3JlENR0XGER4kfxdBHJgjfmBSsvrmiBsbswNkDRQTecHWt-QUEwfBGIL7H8nNN9FYhx6_-o7DB0G6OnG2EKVTmDEXwkfN82-KXCHmP_C3kKNNDtj_jvYUWR1Hbtl6hXTa-YWLN8KbvFQYB6Rv7SMmWUaAFeA3sp3r1MGY8ien0P54-ZgOHsodupx2eP&jobId=2938d7b0-6548-4e13-8f42-fb62e4a2cb4a status: 403"0 -
Possibly unhandled Error: Unable to load proxy.ashx?https://vtanr.maps.arcgis.com/sharing/rest/content/users/vtanrgis/items/474…3sp3r1MGY8ien0P54-ZgOHsodupx2eP&jobId=2938d7b0-6548-4e13-8f42-fb62e4a2cb4a status: 403
at Error (native)
at new n (https://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:218:120)
at n [as handleResponse] (https://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:151:189)
at XMLHttpRequest.f (https://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:155:201)0 -
Hi Erik,
It sounds like your proxy.config file is missing an entry to allow a call to a particular domain. The proxy.config file should be located here - C:/inetpub/wwwroot/ANR/Html5Viewer_2_6/ and to see what entry is required you can use Fiddler to see what calls are using the proxy. Based on your messages above it appears that https://vtanr.maps.arcgis.com will need to be added. You can copy the existing lines to get the correct syntax. The line matchAll="true" will allow all domain suffixes and not just the exact URL entered.
Wayne Richard
Latitude Geographics Group Ltd.
Head Office: 300 – 1117 Wharf Street Victoria, BC Canada V8W 1T7
Tel: (250) 381-8130 | Fax: (250) 381-8132 | wrichard@latitudegeo.com
Developers of Geocortex web-based mapping software | www.geocortex.com
An Esri Platinum Business Partner00 -
Thanks Wayne!
I think we're on the right path... If I sign in with a user that is not tied to an organization, the fgdb .zip upload fails.
However, if I sign in with an organizational account, I can get the file to upload to our content as a Feature Layer and a File Geodatabase, but I receive a new error:esri.js:153 Mixed Content: The page at 'https://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/index.html?viewer=ANR_ANRAv2.ANRA5#' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://services5.arcgis.com/Uzks6LSde6r23wwG/arcgis/rest/services/VAST/FeatureServer?f=json'. This request has been blocked; the content must be served over HTTPS.VAST for the record, was the name of the layer I was trying to load... And thus, this error:[error]: 15:39:31.378: Unable to load http://services5.arcgis.com/Uzks6LSde6r23wwG/arcgis/rest/services/VAST/FeatureServer?f=json status: 0 bluebird.min.js:29 Possibly unhandled Error: Unable to load http://services5.arcgis.com/Uzks6LSde6r23wwG/arcgis/rest/services/VAST/FeatureServer?f=json status: 0 at Error (native) at new n (https://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:218:120) at XMLHttpRequest.h (https://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:155:235) at k (https://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:153:146) at Object.b.xhr (https://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:186:209) at Function.b.xhrGet [as get] (https://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:186:492) at w (https://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:761:230) at d (https://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:763:32) at Object.v (https://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Scripts/esri.js:769:60) at Object.esri.request (https://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/Resources/Compiled/Mapping.Infrastructure.js:858:124)I have no idea where services5 would be calling for http and not https.
0 -
Hi Erik,
The offending URL is
http://services5.arcgis.com/Uzks6LSde6r23wwG/arcgis/rest/services/VAST/FeatureServer?f=json
which appears to be the published FGDB so based on this it appears that the upload worked but a query after the upload is failing due to mixed content. I'm not sure you can do anything because at this point it appears to be a bug. I will file this issue and have a QA developer look at it. I will get back to you ASAP.
Some browsers get really upset with mixed content and your site currently has some images that are http, I would also convert them over to https to avoid any future issues. The images I am referring to can be seen by hitting F12 in the browser and clicking the console tab. You should see a message like -
Mixed Content: The page at 'https://dev.maps.vermont.gov/ANR/Html5Viewer_2_6/index.html?viewer=ANR_ANRAv2.ANRA5' was loaded over HTTPS, but requested an insecure image 'http://anrmaps.vermont.gov/websites/HomePanel/Images/MapSimply_200.jpg'. This content should also be served over HTTPS.
I hope this helps.
Regards,
Wayne0 -
Thanks Wayne! I'm aware of those images. They happen to appear in my home panel.
As you can see from our link, this is a development server and I was testing out the new functionality for a presentation on the new tools that our viewers will be offering soon. I just hadn't got to those yet, after switching over to SSL protocols due to the new functionality requiring our sites have a login. I wanted to show users how they can link their ArcGIS Online accounts and upload FGDBs to our viewer and host them on their AGO account. Pretty cool when we get it to work.
I will try switching back to simply HTTP to see if I can get that to work.
If there is any input regarding the requirements for FGDB uploads to AGO, that'd be helpful. I can't seem to get them to upload to AGO unless the user is linked to our organizational account. I'll look through the GE guides to see if there is any guidance.
Thanks again!0 -
Hi Everyone!
When I try to enabled security on one of my map sites I receive a simliar error (below). Any help would be amazing! We have the same environment setup in test, so im not sure why it wont work in production.
If I try to logon to the Geocortex server itself and access the site, it keeps prompting for my login and rejecting it completely. I cant even sign into the Essentials Manager site from the server, but I can fine from my Desktop.
Error: The current user cannot access the desired resource.
at Error (native)
at Object.n.load (http://mapit.fortworthtexas.gov/Html5Viewer/Resources/Scripts/esri.js:610:426)
at http://mapit.fortworthtexas.gov/Html5Viewer/Resources/Scripts/esri.js:182:69
at c (http://mapit.fortworthtexas.gov/Html5Viewer/Resources/Scripts/esri.js:67:221)
at d (http://mapit.fortworthtexas.gov/Html5Viewer/Resources/Scripts/esri.js:67:10)
at resolve.callback (http://mapit.fortworthtexas.gov/Html5Viewer/Resources/Scripts/esri.js:68:350)
at c (http://mapit.fortworthtexas.gov/Html5Viewer/Resources/Scripts/esri.js:67:436)
at d (http://mapit.fortworthtexas.gov/Html5Viewer/Resources/Scripts/esri.js:67:10)
at resolve.callback (http://mapit.fortworthtexas.gov/Html5Viewer/Resources/Scripts/esri.js:68:350)
at http://mapit.fortworthtexas.gov/Html5Viewer/Resources/Scripts/esri.js:186:3000
Please sign in to leave a comment.
Comments
7 comments