esri.request not working in IE* "Access is denied error"

3993
8
10-22-2012 02:26 AM
yongwang
New Contributor II
I dropped a copy of the "Add Shapefile" sample, http://help.arcgis.com/EN/webapi/javascript/arcgis/demos/portal/portal_addshapefile.html, on my server, updated the css and proxy links and fired it up and it works fine in Chrome and FF.

Btw, the actual sample running on Esri's box works fine in all browsers.

In IE* when the esri.request fires it fails with error: "Unable to get value of the property 'value': object is null or undefined".

I updated proxy config   with "http://www.arcgis.com". and then got an "Access is denied error" in IE.
Firefox and Chrome works fine but not in IE.

ID dev tools shows the following 404 error:


http://www.arcgis.com/arcgisserver/apis/javascript/proxy/proxy.ashx?http://www.arcgis.com/sharing/re... POST 404 text/html

http://www.arcgis.com/arcgisserver/apis/javascript/proxy/js/esri/arcgisonline/config.js GET 404 text/html

Any hint?

FYI: I change the proxy.ashx to the one on my local server instead of arcgis.com, I got another different error:
Unable to get value of the property 'value': object is null or undefined

The error seems to be in minified javascript but I was not able to trace to exact line of code.

Thanks very much,

Yong
0 Kudos
8 Replies
yongwang
New Contributor II
Anyone have similar issue?
0 Kudos
JohnGravois
Frequent Contributor
i was able to reproduce the problem you described by downloading the zipped application and running it on my own machine without modifying the proxy.  the reason the application functions in firefox and chrome is because those browsers support CORS and can POST without a proxy at all.

it is absolutely essential to make sure you are working with a local proxy (rather than one hosted on arcgis.com).  in order to troubleshoot yours, try setting the mustMatch flag to "false" temporarily and testing something similar to the following directly in the browser to see if a page is returned.

http://[machinename]/proxy/proxy.ashx?http://esri.com

see the following article for more information about configuring proxies...
0 Kudos
yongwang
New Contributor II
Hi John,

Thanks very much for your reply.

I followed the article and did what you instructed.

HTTP Error 500 - ConnectFailure (Internal Server Error): The page cannot be displayed because an internal server error has occurred.

Here is the details error info returned by IIS:

Module ManagedPipelineHandler
Notification ExecuteRequestHandler
Handler SimpleHandlerFactory-Integrated-4.0
Error Code 0x00000000
Requested URL http://localhost:80/proxy/proxy.ashx?http://www.esri.com
Physical Path C:\inetpub\wwwroot\proxy\proxy.ashx
Logon Method Anonymous
Logon User Anonymous

Any further hint?

Thanks.

Regards,

Yong

i was able to reproduce the problem you described by downloading the zipped application and running it on my own machine without modifying the proxy.  the reason the application functions in firefox and chrome is because those browsers support CORS and can POST without a proxy at all.

it is absolutely essential to make sure you are working with a local proxy (rather than one hosted on arcgis.com).  in order to troubleshoot yours, try setting the mustMatch flag to "false" temporarily and testing something similar to the following directly in the browser to see if a page is returned.

http://[machinename]/proxy/proxy.ashx?http://esri.com

see the following article for more information about configuring proxies...
0 Kudos
JohnGravois
Frequent Contributor
if you're certain that you converted the folder which stores the proxy to an application using IIS manager and you're receiving 500 errors regardless of the page you try and access, its tough to say.

here are some possibilities
1. an outgoing proxy is also in use which restricts access to pages to known identities on the network.  (this could explain why you yourself could visit esri.com on a machine, but a request made on behalf of the application pool is denied).  in this situation it is possible either that the request is intercepted by the outgoing proxy and blocked, or that it bypasses the outgoing proxy entirely (and still fails)

it would be helpful to get your IT staff involved to try and root out the cause of the problem.  tools like wireshark and tcpdump provide the low-level information necessary to snoop appropriate packet traffic, but they aren't particularly easy navigate.
0 Kudos
yongwang
New Contributor II
Hi John,

I got my proxy working, the it redirect to the correct site if I type "http://localhost/proxy/proxy.ashx?http://www.esri.com"
in the browser.

I also got the add shape file working in IE.

However it only works if I put the add shape file html in the default website (same as the proxy app in c:\inetpub\wwwroot). In the browser address bar, http://localhost/test/addshapefile.html, this works.

Ideally I want to put the add shape file html in a different folder and bind to my domain. As long as I do that, e.g. bind the app to www.mysite.com/addshapefile.html, This still gives me an access is dined error. I tried to put the proxy app to the same folder as www.mysite.com, but it does not work either.

Any idea why this is happening?

Thanks very much for your help so far!

Regards,

Yong


if you're certain that you converted the folder which stores the proxy to an application using IIS manager and you're receiving 500 errors regardless of the page you try and access, its tough to say.

here are some possibilities
1. an outgoing proxy is also in use which restricts access to pages to known identities on the network.  (this could explain why you yourself could visit esri.com on a machine, but a request made on behalf of the application pool is denied).  in this situation it is possible either that the request is intercepted by the outgoing proxy and blocked, or that it bypasses the outgoing proxy entirely (and still fails)

it would be helpful to get your IT staff involved to try and root out the cause of the problem.  tools like wireshark and tcpdump provide the low-level information necessary to snoop appropriate packet traffic, but they aren't particularly easy navigate.
0 Kudos
JohnGravois
Frequent Contributor
how are you referencing the proxy in the application?

if your application is stored in the root of the web server and the proxy is in a subfolder, you would reference it like this.
esri.config.defaults.io.proxyUrl = "/proxy/proxy.ashx";
0 Kudos
VEERUTALREJA
New Contributor
I have faced the same issues and tried everything given above...tried my own local proxy..tried other things as well but nothing works...Plzzz need a solution for it....Help
0 Kudos
KierenHarvey
New Contributor
I just troubleshooted a similar problem in IE8. I observed that IE wouldn't even POST to the server, the 'Access Denied' message came from IE. I tracked this down to a page served up over HTTPS trying to invoke a request (e.g. ESRI identify task) to a resource over HTTP, and across domains. By also ensuring the resource came over HTTPS, the browser was able to POST back. The resource was the sample proxy.ashx as provided by ESRI on their Working with a proxy page.
0 Kudos