Select to view content in your preferred language

Edit Widget & Attachments

2998
15
10-15-2010 12:32 PM
BarrettStanke
New Contributor
When I edit locations within viewer 2.1, all my edits save properly but clicking the link to the attachment opens another window but the file doesn't open and I get a dreaded HTTP 500 Internal Server Error.  How do I go about correcting this?

Also, is there a limit to the size of file you can attach?  Having trouble with anything over 5 MB.
Tags (2)
0 Kudos
15 Replies
IvanBaehr
New Contributor
Thanks for your response Frank,

I suppose I have misunderstood the function of attachments. I thought it would be possible for users to upload attachments to the features in the editable layer from the edit widget, which would be very useful for our users.

Ivan Baehr
UNOSAT
0 Kudos
FrankRoberts
Occasional Contributor III
Ivan, you are correct that you can upload attachments via the editable layer using the edit widget.  The think that is confusing, at least it was to me, that in order to make use of this function via the flexviewer editor (at least at V 2.3), you will need to use the function in ArcCatalog to make the attachments fields.  The result of this is a related table that stores the attachments, as apposed to having fields directly in the feature table that would hold the attachments (ie with everything else you might have in your attribute table eg. objectid, shape, name, ......).

You might look at this:
http://blogs.esri.com/Dev/blogs/arcgisdesktop/archive/2010/12/21/Using-attachments-to-manage-associa...


Hope that helps,
Frank
0 Kudos
FrankRoberts
Occasional Contributor III
I too found out that virtual directory was not created in IIS for my arcgisoutput directory. Soon as I made that virtual directory in IIS and made sure the permissions would allow for web access,  and it worked!

One thing to note is that my virtual directory is called "arcgisoutput", is pathed to"c:\arcgisserver\arcgisoutput", and it appears as www.fishcda.com/arcgisoutput, however if you look at the actual link that is supplied by rest it looks like the links above (e.g. http://www.fishcda.com/ArcGIS/rest/services/SampleEdit/FeatureServer/3/411/attachments/2). This may lead some to believe that you need to have this crazy long path/nested virtual directories all set up (at least that is what I thought at first look). Apparently, through the magic of ArcGIS Server it translates all this and points the file back to the simple location such as www.fishcda.com\arcgisoutput.

Hope that helps someone,
0 Kudos
IvanBaehr
New Contributor
Thanks Frank,

I followed the steps from http://blogs.esri.com/Dev/blogs/arcg...e-content.aspx
creating attachments to the feature class in the SDE and now I can upload and download attachments to my editable layer.

Thanks,
Ivan Baehr
UNOSAT
0 Kudos
MeghanMcGaffin
New Contributor
I too found out that virtual directory was not created in IIS for my arcgisoutput directory. Soon as I made that virtual directory in IIS and made sure the permissions would allow for web access,  and it worked!

One thing to note is that my virtual directory is called "arcgisoutput", is pathed to"c:\arcgisserver\arcgisoutput", and it appears as www.fishcda.com/arcgisoutput, however if you look at the actual link that is supplied by rest it looks like the links above (e.g. http://www.fishcda.com/ArcGIS/rest/services/SampleEdit/FeatureServer/3/411/attachments/2). This may lead some to believe that you need to have this crazy long path/nested virtual directories all set up (at least that is what I thought at first look). Apparently, through the magic of ArcGIS Server it translates all this and points the file back to the simple location such as www.fishcda.com\arcgisoutput.

Hope that helps someone,


THIS WORKED!!!!  Whooo hooo!!!  I can't tell you how FREAKING RELIEVED I am 🙂
0 Kudos
TarigAhmed1
New Contributor III
There seem to be some authentication issue going on with your web server. 

If I navigate to it via the REST Service Directory, I can see that it has one PDF attachment: 
http://emrgisviewer.emr-inc.com/ArcGIS/rest/services/CPR/CPR_Data/FeatureServer/2/818/attachments

but when I click the PDF link: 
http://emrgisviewer.emr-inc.com/ArcGIS/rest/services/CPR/CPR_Data/FeatureServer/2/818/attachments/80...

I get an "Unauthorized" error: 
Server Error - The remote server returned an error: (401) Unauthorized.
Code: 500


---------------------------------------------------
In my case the virtual directory look good and the IUSR has access, but I'm still getting the error. I was able to see the attachments at one point but now, i get the same error above.
here's the website:
http://www.arcgis.com/explorer/?open=f78747236bea4bccbe951fba71bd361f
and here's the attachment:
http://maps.mckinneytexas.org/ArcGIS/rest/services/Notes/FeatureServer/0/402/attachments/402

Thanks in advance for your help.
Tarig
0 Kudos