Hi,
I want to know if .NET API allows me to send credentials just like the Android API.
When I create an instance of a GeodatabaseSyncTask on Android, we may pass the crendentials to GeodatabaseSyncTask, like this:
GeodatabaseSyncTask gdbSyncTask = new GeodatabaseSyncTask(url, userCredentials)
But in .NET API it just gives me the option of the token type authentication. I really need to send credentials (username and password) to authenticate on ArcGisServer
Solved! Go to Solution.
I found the answer whith a Antti Kajanus help.
System.Net.NetworkCredential networkCredential = new System.Net.NetworkCredential(userName, passWord, domain);
var credential = new ArcGISNetworkCredential
{
Credentials = networkCredential,
ServiceUri = this.featureService.Url
};
IdentityManager.Current.AddCredential(credential);
I found the answer whith a Antti Kajanus help.
System.Net.NetworkCredential networkCredential = new System.Net.NetworkCredential(userName, passWord, domain);
var credential = new ArcGISNetworkCredential
{
Credentials = networkCredential,
ServiceUri = this.featureService.Url
};
IdentityManager.Current.AddCredential(credential);