Fail To Attach File to Feature Layer

6107
6
06-04-2012 05:54 AM
deleted-user-hb3f0SCDAPf8
New Contributor II
I have a feature layer which has attachments.  I can attach and view documents to selected features using AttachmentEditor. But if the document is large (> 4MB) ,  it will fail and display this message ???The remote server returned an error: NotFound.??? almost immediately.

The map service timeouts are all set to 1 hour (just testing).  The MaxRequestLength in service.config and the MaxUploadSize in rest.config are both set to 100MB.
I can attach the same large document in ArcMap and view it with AttachmentEditor with no problem.  It's just with loading that it's having problem.

I???ve opened a ticket with support, but have not heard back.  I would appreciate it very much if any of you gurus help me out here.

<esri:AttachmentEditor x:Name="DocAttachmentEditor" VerticalAlignment="Top"
                             Background="WhiteSmoke" Width="280" Height="100" HorizontalAlignment="Right"                             
                             FeatureLayer="{Binding Layers[DocLayer], ElementName=MyMap}"
                             Filter="All Files (*.*)|*.*|Image Files|*.tif;*.jpg;*.gif;*.png;*.bmp|Text Files (.txt)|*.txt|Adobe Files(.pdf)|*.pdf"
                             FilterIndex="1" Multiselect="True"
                             UploadFailed="DocAttachmentEditor_UploadFailed" d:IsHidden="True">

Thanks
Fardosht
0 Kudos
6 Replies
JenniferNery
Esri Regular Contributor
I was able to repro with 10.1 server. Can you check to see if we have the same error message from Fiddler?
<html>
<head>
<title>
Error: Error parsing multi-part request</title>
<link href="https://community.esri.com/arcgis/rest/static/main.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<table width="100%" class="userTable">
<tr>
<td class="titlecell">ArcGIS REST Framework</td>
</tr>
</table>
<table width="100%" class="navTable">
<tr valign="top">
<td class="breadcrumbs">
<a href="https://community.esri.com/arcgis/rest/services">Home</a>
</td>
</tr>
</table>
<div class="cbody">
<br/>
<br/>
<b>Error: </b>Error parsing multi-part request<br/>
<b>Code: </b>500<br/><br/>
<div style="color:#ff6666"> </div>
</div>
</body>
</html>


If you are using ArcGIS Server v10.1, I believe this is where UploadTask becomes useful.
0 Kudos
HaydnDyer
New Contributor II
Im also getting the error 'Error Parsing Multipart Request' (shown in the arcgis server logs) when attempting to upload attachments to server 10.1 via a feature service using the rest interface.  However, the file appears to upload to the server and the web adapter returns the error 'The request was aborted'

Note: This error only occurs when using the web adapter.  When using port 6080 all attachments upload without any issues.

I have tried:
- updating the maxRequestLength, maxUploadSize and maxAllowedContentLength in the arcgis>web.config
- updating the ReconnectServerOnFailureInterval and RefreshServerListInterval in the WebAdapter.config
- updating the sites maxHeapSize and SocHeapSize for the ArcGIS server site via the admin page
- updating the maxUsageTime for the map service

Has anyone else experienced this issue?

Thanks,

Haydn
0 Kudos
BerendVeldkamp
Occasional Contributor II
It's been a while, but did you ever solve this issue? I get the same error message, but only when I upload an attachment from a mobile device (Tried a Galaxy SII+ and an HTC One X). It does work for small attachments though.

To add the attachment, I just go to the REST endpoint of a feature, e.g. http://[server]/arcgis/rest/services/[service]/FeatureServer/0/2807/addAttachment and try to upload a file. Then I get:

Error: Error parsing multi-part request
Code: 500

ArcGIS Server is 10.1 SP1
0 Kudos
AlexMagruder
New Contributor III

We’ve been getting this error as well, but intermittently. We are attempting to push batch photos to the server using the Rest service addAttachment. It can get thrown anywhere from 5 to 20 min of successful operation. First assumption was a server problem, but no change to the service config helped. Finally decided to handle it client side. If the Request returns with a 500 error code it waits 30sec and tries again. After 5 tries it stops attempting and produces the error to the user. This works. The error still gets thrown but after waiting the 30sec it successfully pushes.

ArcServer 10.1

Mobile Device: Samsung galaxy tab

0 Kudos
JeffPace
MVP Alum

I am getting this error on all attachments on all services

from desktop (web browser) and mobile

attachment size is 20kb, tried a variety of attachments (png, jpg)

Using javascript api 3.14, any ideas?

HamishMills
Occasional Contributor

We are also having similar issue here.

Users are using collector on iPad to sync an average of 100-200mb of attachments, spread across anywhere from 100-300 feature edits. Previous user testing had shown that there was no issue with syncs of this size, but just after the official launch of collector within our organisation, we are getting multiple errors in the field. The standard error I am getting is: Unable to process request. Error parsing multi-part request

and also am sometimes seeing: Error: The item was not found. The item was not found. The item was not found. The item was not found.

Any help would be most appreciated, we are under extreme pressure from the business to resolve this issue immediately.

0 Kudos