"The selected layer file is not valid" error when attempting to open a layer file from a network folder

08-31-2017 11:30 AM
Occasional Contributor II

I've noticed that sometimes I get a System.ArgumentException when attempting to add a layer at this line:

LayerFactory.Instance.CreateLayer(new Uri(uri), map)


var 'uri' is a string containing the full path of a .lyrx file (ex: "D:\Data\my_layer.lyrx").  If the path is on a shared network drive, some of the time I get the exception.  I'm also unable to navigate to that folder in the ArcGIS Pro Catalog.  Sometime it does work, however but it seems random.  There is no loss of connection to the folder in Windows Explorer when this error occurs.


Is it possible to force a refresh or reconnect to the network folder before attempting to access files?  Has anyone else experienced a similar issue?

0 Kudos
0 Replies