we use Arc Pro to export a group layer into a LYRX file. This layer file indicates a FileGDB in the dataConnection
"dataConnection" : {
"type" : "CIMStandardDataConnection",
"workspaceConnectionString" : "DATABASE=C:\\Users\\Jun.Guan\\OneDrive - Bentley Systems, Inc\\Documents\\ArcGIS\\Packages\\KEk_GIS_20230414a_ajs_for_Geosoft_1ff973\\p20\\ek_map_20220622_ajs.gdb",
"workspaceFactory" : "FileGDB",
"dataset" : "DescriptionOfMapUnits",
"datasetType" : "esriDTTable"
},
We try to load this FileGDB based on the sample in this post: https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodatabase/m-p/1019484/highlight/true#M9689. But we found the sample in the post is for v100.7, and it does not exist in the current version (>100.15). We try:
1. add the sample (DynamicWorkspaceShapefile) into the current version, and get the following error when loading the sample shapefile
---------------------------
Error
---------------------------
Esri.ArcGISRuntime.Http.ArcGISWebException: Failed to create service mpk_blank MapServer. Wrong package type used to start service
at Esri.ArcGISRuntime.Http.HttpDispatcher.SendAsync(HttpRequestMessage request, HandlerOptions options, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Esri.ArcGISRuntime.LocalServices.LocalService.StartServiceInternal(IDictionary`2 serviceSpecificParams, CancellationToken cancellationToken)
at ArcGISRuntime.WPF.Samples.DynamicWorkspaceShapefile.DynamicWorkspaceShapefile.StartLocalMapService(String filename, String path) in
\others\arcgis-maps-sdk-dotnet-samples\src\WPF\WPF.Viewer\Samples\LocalServer\DynamicWorkspaceShapefile\DynamicWorkspaceShapefile.xaml.cs:line 107
---------------------------
OK
---------------------------
2) Update the "Local Server Image Map Layer" sample to load the FileGDB as the following

Get the following error at line 106
Esri.ArcGISRuntime.Http.ArcGISWebException
HResult=0x00000000
Message=Unable to find the specified 'dataSourceName' in 'dataSource' for dynamic dataLayer with 'id': 0.
Source=Esri.ArcGISRuntime
StackTrace:
at Esri.ArcGISRuntime.Http.HttpDispatcher.<SendAsync>d__14.MoveNext()
at Esri.ArcGISRuntime.Internal.RequestHandler.<IssueRequestAndRespond>d__4.MoveNext()
at ArcGIS.WPF.Samples.LocalServerMapImageLayer.LocalServerMapImageLayer.<Initialize>d__2.MoveNext() in
\others\arcgis-maps-sdk-dotnet-samples\src\WPF\WPF.Viewer\Samples\LocalServer\LocalServerMapImageLayer\LocalServerMapImageLayer.xaml.cs:line 125
This exception was originally thrown at this call stack:
[External Code]
ArcGIS.WPF.Samples.LocalServerMapImageLayer.LocalServerMapImageLayer.Initialize() in LocalServerMapImageLayer.xaml.cs
My question is: Is Map SDK able to load a FileGDB (exported from Arc Pro)? if it is, would you please provide a sample code for this issue?
Thanks