We have a Geodatabase that is connected to a SDE as well as a Geodatabase that is derived from a feature service. Both, SDE and Feature Server point to a database that maintains an Utility Network. In both cases we're not able to iterate through the feature definitions using the Pro SDK:
var sdeGeodatabase = new Geodatabase(new DatabaseConnectionFile(new Uri(@"D:\Dokumente\ArcGIS\Packages\ElectricDistributionUtilityNetwork_9C8DDAA7-E710-43A4-9CF4-D136FEBD0B6D\utroot@vhm-sqlserv2016-UTProESRISampleData.sde")));
var serviceGeodatabase = new Geodatabase(new ServiceConnectionProperties(new Uri(@"https://vhm-ut-portal.nbb.intern.aed-sicad.de/server/rest/services/Electric_Distribution_Utility_Net...")));
// Those calls working properly, retrieving the Standalone Tables...
var tableDefinitions1 = sdeGeodatabase.GetDefinitions<TableDefinition>().ToList(); // works
var tableDefinitions2 = serviceGeodatabase.GetDefinitions<TableDefinition>().ToList(); // works
// Those calls fail, bringing up a COM Error-Message
var featureClassDefinition1 = sdeGeodatabase.GetDefinitions<FeatureClassDefinition>().ToList(); // Error
var featureClassDefinition2 = serviceGeodatabase.GetDefinitions<FeatureClassDefinition>().ToList(); // Error
In both cases the call to Geodatabase.GetDefinitions<FeatureClassDefinitions>() results in the following error message:
System.Runtime.InteropServices.COMException: 'Ungültige Klassenzeichenfolge (Ausnahme von HRESULT: 0x800401F3 (CO_E_CLASSSTRING))'
Sorry for the german here, translation is 'Invalid Class String' - HRESULT: 0x800401F3
We assume that it might have something to do with the Utility Network (especially the internal UN Business Tables) which might cause this issue. Retrieving a FeatureDatasetDefinition first is not an option, since a Feature Server does not support that.
Thanks for your suggestions. Would be great if we can resolve that somehow...
Greetings
Karl