Select to view content in your preferred language

What could be causing Attachments to fail in a GeoForm submission?

3978
12
Jump to solution
06-14-2017 08:00 AM
by Anonymous User
Not applicable

I am working with a configured a GeoForm which includes the ability to submit attachments.

Recently, attachments are failing to load, throwing an error when I submit a GeoForm entry. 

What could be causing this?

Here's some relevant variables: 

  • The feature service for the GeoForm is hosted on an ArcGIS Server instance that inhabits one virtual machine, while the backend database (SQL Server) inhabits another virtual machine. The speak to each other over an open port number. Both virtual machines have > 10 GB of free disc space, plenty of free RAM, and no background processing eating up CPU %.
  • I recently secured the REST service produced by ArcGIS Server. This means that ArcGIS Admin is using a CA-signed certificate in order to enable HTTPS.
  • The error seems more likely to be thrown in response to attempting to upload an image rather than a Word document. Also, clicking 'Retry' over and over sometimes will result in the image file successfully attaching.
12 Replies
by Anonymous User
Not applicable

I would like to point out that:

  • this issue is caused by a known BUG: 
    • BUG-000107195: ArcGIS Online Utility Proxy will fail to include an access-control-allow-origin header when attaching certain files to secure feature services which have been added to ArcGIS Online with stored credentials.
     
  • this issue was resolved by using a Custom Proxy on a locally-hosted service: Use proxy—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers  
ElliottPlack1
Regular Contributor

Jason: thanks for the insightful workaround idea. What was the level of effort like to set up that custom proxy

by Anonymous User
Not applicable

It would have been significant, were it not for Esri Tech support helping me to install it. I worked with a member of the Developer team and we got it installed in ~ 20 minutes.

Basically, you download the template from Esri's GitHub: GitHub - Esri/geoform-template-js. Then you host the template on your IIS server and change the web map to use your web map in config/default.js. Once you have your web map working with the hosted GeoForm, you can install the custom proxy.

  1. Add a DotNet folder to your application root and clone the DotNet proxy components: resource-proxy/DotNet at master · Esri/resource-proxy · GitHub 
  2. Change the Server URL in proxy.config to your server URL (see my example: NPS_Project/proxy.config at master · jasonMatney/NPS_Project · GitHub )
  3. Add a Proxy Rule to index.html (lines 80-84) NPS_Project/index.html at master · jasonMatney/NPS_Project · GitHub  
  4. You can add comments in the default.js file as well (lines 514-518) NPS_Project/defaults.js at master · jasonMatney/NPS_Project · GitHub