<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: addAttachment on secure service using proxy returns 500 internal server error in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/addattachment-on-secure-service-using-proxy/m-p/201100#M18649</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for trying, I’m not having any luck with support yet either.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 May 2016 11:33:18 GMT</pubDate>
    <dc:creator>KathleenBrenkert</dc:creator>
    <dc:date>2016-05-18T11:33:18Z</dc:date>
    <item>
      <title>addAttachment on secure service using proxy returns 500 internal server error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/addattachment-on-secure-service-using-proxy/m-p/201096#M18645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I use an non-secured feature service, it does not use the proxy and I have no problem uploading an attachment.&amp;nbsp; As soon as I use a secure feature service, I get 500 internal server error.&amp;nbsp; I'm at a complete loss.&amp;nbsp; I've called support and they are researching it.&amp;nbsp; It seems to be a problem with the proxy, possibly in how I've set it up, but I can't figure it out.&amp;nbsp; Using the dotnet proxy from esri's github.&amp;nbsp; &lt;/P&gt;&lt;P&gt;code below works if my service is not secure, but the fLayer I've plugged in here is secure and I get the 500 error.&amp;nbsp; Server 10.3.1, Javascript 3.13&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;html:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;form id="attachOne"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;label class="file_upload"&amp;gt;Select a file to attach:&amp;lt;/label&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type="file" name="attachment"&amp;nbsp; /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type="button" id="submitButton" value="Upload"&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;javascript:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;require(["esri/config","esri/dijit/editing/Add", 
"esri/layers/FeatureLayer", "esri/urlUtils","dojo/dom",&amp;nbsp; "dojo/on", 
"dojo/domReady!"


], function (esriConfig, Add, FeatureLayer, urlUtils, dom, on){

&amp;nbsp;&amp;nbsp;&amp;nbsp; "use strict";
&amp;nbsp;&amp;nbsp;&amp;nbsp; 

&amp;nbsp;&amp;nbsp;&amp;nbsp; urlUtils.addProxyRule({
&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urlPrefix: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgis.northcharleston.org%2Farcgis%2Frest%2Fservices%2FFeature%2FOneStopShop%2FFeatureServer%2F" target="_blank"&gt;https://gis.northcharleston.org/arcgis/rest/services/Feature/OneStopShop/FeatureServer/&lt;/A&gt;&lt;SPAN&gt;", &lt;/SPAN&gt;
&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proxyUrl:"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgis.northcharleston.org%2FDotNet%2Fproxy.ashx" target="_blank"&gt;https://gis.northcharleston.org/DotNet/proxy.ashx&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; on(dom.byId("submitButton"), "click", uploadFile);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; function uploadFile(){
&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var fLayer=new FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgis.northcharleston.org%2Farcgis%2Frest%2Fservices%2FFeature%2FOneStopShop%2FFeatureServer%2F0" target="_blank"&gt;https://gis.northcharleston.org/arcgis/rest/services/Feature/OneStopShop/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fLayer.addAttachment(24404, document.getElementById("attachOne"), function(result){console.log(result);}, function(errorMessage){console.log(errorMessage);});
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
, function(errorMessage){console.log(errorMessage);});
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:00:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/addattachment-on-secure-service-using-proxy/m-p/201096#M18645</guid>
      <dc:creator>KathleenBrenkert</dc:creator>
      <dc:date>2021-12-11T10:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: addAttachment on secure service using proxy returns 500 internal server error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/addattachment-on-secure-service-using-proxy/m-p/201097#M18646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kathleen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; And you have a serverUrl added in your proxy.config for "&lt;A href="https://gis.northcharleston.org/" title="https://gis.northcharleston.org/"&gt;https://gis.northcharleston.org&lt;/A&gt;​" right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 16:20:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/addattachment-on-secure-service-using-proxy/m-p/201097#M18646</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-05-17T16:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: addAttachment on secure service using proxy returns 500 internal server error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/addattachment-on-secure-service-using-proxy/m-p/201098#M18647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the proxy works as far as loading my secure service to a map and applying edits. It wasn't until I attempted to attach files that I started getting the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sent from my iPhone&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 16:47:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/addattachment-on-secure-service-using-proxy/m-p/201098#M18647</guid>
      <dc:creator>KathleenBrenkert</dc:creator>
      <dc:date>2016-05-17T16:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: addAttachment on secure service using proxy returns 500 internal server error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/addattachment-on-secure-service-using-proxy/m-p/201099#M18648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kathleen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; There must be an issue with the proxy not doing the attachment requests through the proxy then. Sorry I can not bee of more help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 17:25:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/addattachment-on-secure-service-using-proxy/m-p/201099#M18648</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-05-17T17:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: addAttachment on secure service using proxy returns 500 internal server error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/addattachment-on-secure-service-using-proxy/m-p/201100#M18649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for trying, I’m not having any luck with support yet either.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2016 11:33:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/addattachment-on-secure-service-using-proxy/m-p/201100#M18649</guid>
      <dc:creator>KathleenBrenkert</dc:creator>
      <dc:date>2016-05-18T11:33:18Z</dc:date>
    </item>
  </channel>
</rss>

