<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Anyone had issues programmatically connecting to a map service layer for a filesystem GDB in 10.5.1? in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/anyone-had-issues-programmatically-connecting-to-a/m-p/727482#M27710</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are currently upgrading our 10.1 ArcGIS servers to 10.5.1, additionally upgrading our Spatial Databases and applications in tandem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;protected virtual void AddArcServerXxxxLayer(ArcServerXxxxLayer layer)&lt;BR /&gt; {&lt;BR /&gt; Log.InfoFormat("Add ArcServerXxxxLayer ServiceUrl={0},ServiceName={1}", layer.ServiceUrl, layer.ServiceName);&lt;BR /&gt; IAGSServerConnectionName2 ags = new AGSServerConnectionNameClass();&lt;BR /&gt; IPropertySet props = new PropertySetClass();&lt;BR /&gt; props.SetProperty("url", layer.ServiceUrl);&lt;BR /&gt; ags.ConnectionProperties = props;&lt;/P&gt;&lt;P&gt;IAGSServerObjectName3 agsName = new AGSServerObjectNameClass();&lt;BR /&gt; agsName.Name = layer.ServiceName;&lt;BR /&gt; agsName.Type = "MapServer";&lt;BR /&gt; agsName.AGSServerConnectionName = ags;&lt;BR /&gt; &lt;BR /&gt; MapServerLayerClass mapServerLayer = new MapServerLayerClass();&lt;BR /&gt; mapServerLayer.ServerConnect(agsName, ""); //Failing here&lt;/P&gt;&lt;P&gt;mapServerLayer.Name = layer.Id.ToString();&lt;/P&gt;&lt;P&gt;_map.AddLayer(mapServerLayer);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Service Url: &lt;A href="https://arcgisserver.domain.com/arcgis/services"&gt;https://&amp;lt;arcgisservername&amp;gt;.&amp;lt;domain&amp;gt;/arcgis/services&lt;/A&gt;&lt;/P&gt;&lt;P&gt;ServiceName : &amp;lt;Application&amp;gt;BaseMap (Matches service name in ArcServer Manager)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception Message: "&lt;/P&gt;&lt;P&gt;An unhandled exception of type 'System.AccessViolationException' occurred in &amp;lt;FrameworkWrapperLibary&amp;gt;.dll&lt;/P&gt;&lt;P&gt;Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Feb 2018 04:47:17 GMT</pubDate>
    <dc:creator>MichaelHolmes2</dc:creator>
    <dc:date>2018-02-16T04:47:17Z</dc:date>
    <item>
      <title>Anyone had issues programmatically connecting to a map service layer for a filesystem GDB in 10.5.1?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/anyone-had-issues-programmatically-connecting-to-a/m-p/727482#M27710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are currently upgrading our 10.1 ArcGIS servers to 10.5.1, additionally upgrading our Spatial Databases and applications in tandem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;protected virtual void AddArcServerXxxxLayer(ArcServerXxxxLayer layer)&lt;BR /&gt; {&lt;BR /&gt; Log.InfoFormat("Add ArcServerXxxxLayer ServiceUrl={0},ServiceName={1}", layer.ServiceUrl, layer.ServiceName);&lt;BR /&gt; IAGSServerConnectionName2 ags = new AGSServerConnectionNameClass();&lt;BR /&gt; IPropertySet props = new PropertySetClass();&lt;BR /&gt; props.SetProperty("url", layer.ServiceUrl);&lt;BR /&gt; ags.ConnectionProperties = props;&lt;/P&gt;&lt;P&gt;IAGSServerObjectName3 agsName = new AGSServerObjectNameClass();&lt;BR /&gt; agsName.Name = layer.ServiceName;&lt;BR /&gt; agsName.Type = "MapServer";&lt;BR /&gt; agsName.AGSServerConnectionName = ags;&lt;BR /&gt; &lt;BR /&gt; MapServerLayerClass mapServerLayer = new MapServerLayerClass();&lt;BR /&gt; mapServerLayer.ServerConnect(agsName, ""); //Failing here&lt;/P&gt;&lt;P&gt;mapServerLayer.Name = layer.Id.ToString();&lt;/P&gt;&lt;P&gt;_map.AddLayer(mapServerLayer);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Service Url: &lt;A href="https://arcgisserver.domain.com/arcgis/services"&gt;https://&amp;lt;arcgisservername&amp;gt;.&amp;lt;domain&amp;gt;/arcgis/services&lt;/A&gt;&lt;/P&gt;&lt;P&gt;ServiceName : &amp;lt;Application&amp;gt;BaseMap (Matches service name in ArcServer Manager)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception Message: "&lt;/P&gt;&lt;P&gt;An unhandled exception of type 'System.AccessViolationException' occurred in &amp;lt;FrameworkWrapperLibary&amp;gt;.dll&lt;/P&gt;&lt;P&gt;Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 04:47:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/anyone-had-issues-programmatically-connecting-to-a/m-p/727482#M27710</guid>
      <dc:creator>MichaelHolmes2</dc:creator>
      <dc:date>2018-02-16T04:47:17Z</dc:date>
    </item>
  </channel>
</rss>

