I am trying to add a secure layer of an ArcGIS Server. But even with the user / password, ArcGIS Pro shows me a login window to add my layer.
How to get there directly without this login window?
My code information:
CIMInternetServerConnection isc = new CIMInternetServerConnection()
{
URL = urlFeature,
User = "username",
Password = "password",
Anonymous = false,
HideUserProperty = false
};
CIMAGSServiceConnection ags = new CIMAGSServiceConnection()
{
ServerConnection = isc,
ObjectName = "Transactions",
Capabilities = "Query,Create,Update,Delete,Uploads,Editing",
Description = "",
ObjectType = "Feature Layer",
URL = urlFeature
};
try
{
var layer = LayerFactory.Instance.CreateFeatureLayer(ags, map);
}
catch (Exception e)
{
MessageBox.Show( e.Message);
}