esri.request not working in IE*

1568
6
09-14-2012 11:42 AM
KeithSandell
New Contributor III
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".

What might be the problem? Is there a work around?

//use the rest generate operation to generate a feature collection from the zipped shapefile 
esri.request({
          url: portalUrl + '/sharing/rest/content/features/generate',
          content: myContent,
          form: dojo.byId('uploadForm'),
          handleAs: 'json',
          load: dojo.hitch(this, function (response) {
            dojo.byId('upload-status').innerHTML = '<b>Loaded: </b>' + response.featureCollection.layers[0].layerDefinition.name;
            addShapefileToMap(response.featureCollection);
          }),
          error: dojo.hitch(this, errorHandler)
        });
0 Kudos
6 Replies
KellyHutchins
Esri Frequent Contributor
If you updated the proxy location then it should just work. Have you examined the requests using either the IE Dev tools or Fiddler to see if there are any issues?
0 Kudos
KeithSandell
New Contributor III
The proxy config needed to be updated with "http://www.arcgis.com".

Apparently I haven't had a need for this one yet.

I lost Fiddler when IT upgraded me to Windows 7, but now that I broke all their rules again...

Fiddler exposed it, the Post and Host were different in the FF/Chrome request from the IE request.

All fixed now.

Thanks for reminding me to get and use Fiddler.
0 Kudos
yongwang
New Contributor II
Hi Kelly,

I did the same but 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 esri's javascript I was not able to trace to exact line of code.

Thanks,

Yong


The proxy config needed to be updated with "http://www.arcgis.com".

Apparently I haven't had a need for this one yet.

I lost Fiddler when IT upgraded me to Windows 7, but now that I broke all their rules again...

Fiddler exposed it, the Post and Host were different in the FF/Chrome request from the IE request.

All fixed now.

Thanks for reminding me to get and use Fiddler.
0 Kudos
VIKRANTKRISHNA
New Contributor III
I am getting the same error in upload shapefile sample. Weird thing happening is that if I run sample from esri server, it works fine on my IE9 browser. But if I copy past the same code on my server and run it from there, then it gives "Unable to get value of the property 'value': object is null or undefined" error.

really need help with this.
0 Kudos
VEERUTALREJA
New Contributor
I have been facing the same issue with the Add shapefile sample. I have tried everything from using a button/image instead of forms and even changed the proxy to my local working proxy but still it does not work..Any ideas plzzzz need some help urgently..
0 Kudos
JesvinValencia
New Contributor II
Your firewall might be blocking access to the ArcGIS.com Portal Service. Chrome and Firefox don't seem to need a proxy to access the service, but IE does. Try adding an exception in your firewall for the Portal Service or change your IE security options to add the Portal Service to the Trusted Sites list.
0 Kudos