Anyone had issues programmatically connecting to a map service layer for a filesystem GDB in 10.5.1?

268
0
02-15-2018 08:47 PM
MichaelHolmes2
New Contributor

We are currently upgrading our 10.1 ArcGIS servers to 10.5.1, additionally upgrading our Spatial Databases and applications in tandem.

We have a file-system Geo Database (~2.7Gb) that lives on the ArcGIS server and is referenced as a BaseMap layer for one of our applications, it comprises a series of composite layers/zoom level layers/feature layers. It works correctly as expected in the 10.1 version of our application/map service (ie the 10.1.0.0 version of the ESRI.ArcGIS.Carto assembly can open it fine) but upon copying the GDB to a new 10.5.1 development server/upgrading it to 10.5.1 the MapServerLayerClass throws a memory Access Violation exception and fails. 

The 10.5.1 version of the map service is queryable via the rest endpoint, the MXD behind the service correctly loads and displays all layers in ArcMap 10.5.1.

Other enterprise Geo Databases living in our SQL and Oracle servers and fronted by map services connect correctly using the same wrapper code. This is our only file-system geodatabase as far as I know.

Running the code against the old 10.1 Map Service fails with the same exception, leading me to believe this is a v10.5 ArcObjects issue with ESRI.ArcGIS.Carto

The offending code is as follows, failing on the ServerConnect call. The name of the framework wrapper class has been redacted for client privacy reasons:

protected virtual void AddArcServerXxxxLayer(ArcServerXxxxLayer layer)
{
Log.InfoFormat("Add ArcServerXxxxLayer ServiceUrl={0},ServiceName={1}", layer.ServiceUrl, layer.ServiceName);
IAGSServerConnectionName2 ags = new AGSServerConnectionNameClass();
IPropertySet props = new PropertySetClass();
props.SetProperty("url", layer.ServiceUrl);
ags.ConnectionProperties = props;

IAGSServerObjectName3 agsName = new AGSServerObjectNameClass();
agsName.Name = layer.ServiceName;
agsName.Type = "MapServer";
agsName.AGSServerConnectionName = ags;

MapServerLayerClass mapServerLayer = new MapServerLayerClass();
mapServerLayer.ServerConnect(agsName, ""); //Failing here

mapServerLayer.Name = layer.Id.ToString();

_map.AddLayer(mapServerLayer);
}

Service Url: https://<arcgisservername>.<domain>/arcgis/services

ServiceName : <Application>BaseMap (Matches service name in ArcServer Manager)

Exception Message: "

An unhandled exception of type 'System.AccessViolationException' occurred in <FrameworkWrapperLibary>.dll

Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

0 Kudos
0 Replies