AnsweredAssumed Answered

addAttachment on secure service using proxy returns 500 internal server error

Question asked by katroyer on May 17, 2016
Latest reply on May 18, 2016 by katroyer

If I use an non-secured feature service, it does not use the proxy and I have no problem uploading an attachment.  As soon as I use a secure feature service, I get 500 internal server error.  I'm at a complete loss.  I've called support and they are researching it.  It seems to be a problem with the proxy, possibly in how I've set it up, but I can't figure it out.  Using the dotnet proxy from esri's github. 

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.  Server 10.3.1, Javascript 3.13






"esri/layers/FeatureLayer", "esri/urlUtils","dojo/dom",  "dojo/on", 

], function (esriConfig, Add, FeatureLayer, urlUtils, dom, on){

    "use strict";

                urlPrefix: "", 
    on(dom.byId("submitButton"), "click", uploadFile);
    function uploadFile(){
        var fLayer=new FeatureLayer("");
        fLayer.addAttachment(24404, document.getElementById("attachOne"), function(result){console.log(result);}, function(errorMessage){console.log(errorMessage);});
, function(errorMessage){console.log(errorMessage);});