Select to view content in your preferred language

Adding secure wms service to ArcGIS Pro

456
0
01-14-2019 03:11 AM
MyriamFischer
Occasional Contributor

Hi, I'm trying to add a secure WMS service to ArcGIS Pro. It works with non secured WMS services but comes up with a request for user and password even if they are given in code. In fiddler you can see that the Authorization credentials are not commited for the connection. 

The code is as follows:

QueuedTask.Run(() =>
{
var serverConnection = new CIMInternetServerConnection { URL = wmsLayerEndpoint.Url, Password = wmsLayerEndpoint.Password, User = wmsLayerEndpoint.Username };
var connection = new CIMWMSServiceConnection { ServerConnection = serverConnection, Description = caption, LayerName = name };

var layer = LayerFactory.Instance.CreateLayer(connection, MapView.Active.Map);
layer.SetExpanded(true);
});

Did I miss something or is there a bug.

Help would be highly appreciated.

Thanks.

0 Kudos
0 Replies