Select to view content in your preferred language

applyEdits in IE9

747
3
Jump to solution
06-02-2014 06:13 AM
AlexeiB
Occasional Contributor
Hello,

I am trying to use the applyEdits function on a feature layer in IE 9. In all other versions of the browsers (IE10+, Firefox, Chrome, etc.), it works well and I have no issues. In IE 9 however I get an Access is Denied error.

Has anyone come across this and have an idea how to solve it?

EDIT:

I have added a proxy and am able to access my information via proxy. Verified this by removing the token param I had in my URL and using Firebug to verify that indeed the call is being made via proxy. But the issue of "Error: Access is Denied" is still there if I try to call applyEdits on a feature layer.

Thank you,
0 Kudos
1 Solution

Accepted Solutions
AlexeiB
Occasional Contributor
Turns out I had my services running on http://abc.xyz.com and I was accessing them from http://def.hij.com. I installed the proxy and was trying to figure out why it wasn't working. It turns out the proxy was located on http://abc.xyz.com and NOT on http://def.hij.com. This obviously is an issue because my hij.com is trying to access a resource located on xyz.com which is a cross origin violation. I moved the proxy to def.hij.com and the problem was solved.

The curious part was that the GET requests all came through but my POST actions were being checked (and denied) by the browser. Anyways, hope this helps someone.

Alex

View solution in original post

0 Kudos
3 Replies
Noah-Sager
Esri Regular Contributor
Hi Alex,

Yes, this sounds like a good use case for the proxy page. Are you still getting this same error when the service request goes through the proxy page? If it works in the other major web browsers, I think this (proxy) is at the heart of the issue.

-Noah
0 Kudos
AlexeiB
Occasional Contributor
Thank you for your response Noah.

Yes, I am still getting the same error even though I have implemented the proxy page. When I am doing is:
1. Creating a new feature layer (myFeatureLayer) with a URL to a Feature Service
2. Creating a new graphic (myNewGraphic) with some attributes
3. Calling myFeatureLayer.applyEdits([myNewGraphic], null, null, function(adds,edits,deletes){...});

When running on our dev site, step 3, in all browsers EXCEPT IE 9 work and I am able to add the graphic. However IE 9, it says "Error: Access is Denied."

On localhost in IE 9 however, it prompts me with the "This page is accessing information that is not under its control This poses a security rist. Do you want to continue?"

Do I need to add the secured resources using http or https?

Thank you,

Alex
0 Kudos
AlexeiB
Occasional Contributor
Turns out I had my services running on http://abc.xyz.com and I was accessing them from http://def.hij.com. I installed the proxy and was trying to figure out why it wasn't working. It turns out the proxy was located on http://abc.xyz.com and NOT on http://def.hij.com. This obviously is an issue because my hij.com is trying to access a resource located on xyz.com which is a cross origin violation. I moved the proxy to def.hij.com and the problem was solved.

The curious part was that the GET requests all came through but my POST actions were being checked (and denied) by the browser. Anyways, hope this helps someone.

Alex
0 Kudos