ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Core.Data Namespace / ArcGISServerConnectionFile Class
Members Example

In This Topic
    ArcGISServerConnectionFile Class
    In This Topic
    Represents the physical path to an ArcGIS Server connection file that ends with the .ags extension.
    Syntax
    public sealed class ArcGISServerConnectionFile : Connector 
    Public NotInheritable Class ArcGISServerConnectionFile 
       Inherits Connector
    Example
    Connect to the ArcGISServer using a connection file
    {
      await QueuedTask.Run(() =>
      {
        Uri uriPath = new Uri("path\\to\\the\\ArcGISServerConnectionFile.ags");
        ArcGISServerConnectionFile arcGISServerConnectionFile = new ArcGISServerConnectionFile(uriPath, "FeatureServiceName");
    
        using (Geodatabase geodatabase = new Geodatabase(arcGISServerConnectionFile))
        {
          // Use the geodatabase.
        }
      });
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.Data.Connector
          ArcGIS.Core.Data.ArcGISServerConnectionFile

    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.8 or higher.
    See Also