AnsweredAssumed Answered

GeodatabaseSyncTask.CreateAsync With credentials always return 401

Question asked by tstorck on Apr 6, 2017
Latest reply on Apr 12, 2017 by keith.gemeinhart



When I try to create a GeodatabaseSyncTask with credentials it Always returns 401 unauthorized, even when the credentials are right. Here is the code that I'm using right now:


System.Net.NetworkCredential networkCredential = new System.Net.NetworkCredential(userName, passWord, domain);

            var credential = new ArcGISNetworkCredential
                Credentials = networkCredential,
                ServiceUri = featureURI
            GeodatabaseSyncTask gdbTask = await GeodatabaseSyncTask.CreateAsync(featureURI, credential);


I don't know if my code is wrong, but I've tried it on iOS (API100.0) and old .NET api and it worked fine!