3 Replies Latest reply on Dec 20, 2018 3:50 PM by gregor

    Can't find PI System via .NET AF SDK app




      Myself and a colleague are trying to use an app to connect to a PI System on our corporate network. I can connect, but he cannot.

      In app, the code we are using to find the systems is like so (minified example):

      public class AfConnectionHelper
      private readonly PISystem _piSystem;
      private readonly PISystems _piSystems = new PISystems();
      private string _databaseName;
      /// <summary>
      /// Initialize an AF Connnection object.
      /// it is required to call the Connect method before getting Database or the connected PISystem object
      /// </summary>
      /// <param name="server">Name of the PI System (AF Server) to connect to</param>
      /// <param name="databaseName">Name of the AF DatabaseName to connect to</param>
      public AfConnectionHelper(string server, string databaseName = null)
      if (_piSystems.Contains(server))
      _piSystem = _piSystems[server];
      throw new KeyNotFoundException("Specified PI System does not exist");
      _databaseName = databaseName;


      For me, the server is found inside _piSystems, however for my colleague it is not and he receives the 'Specified PI System does not exist' error.

      The server we are looking for is called GL-SQL-02. My _piSystems appears like:

      but for my colleague it is:

      I've confirmed that we can both telnet to 5450 and 5457 on GL-SQL-02, and using the AboutPI-SDK utility we can both connect to it.

      I got him to do the support data feature with the server/connectivity issues box checked and have attached it.

      Also confirmed that he has access rights to the PI System and can connect and see databases via PI System Explorer.


      Any help appreciated!


        • Re: Can't find PI System via .NET AF SDK app
          Rick Davin

          Hi Mark,


          Is this the same colleague having issues from your other post?
          PI AF Client SDK Windows 10 not supported


          This does not sound like an issue with .NET, the AF SDK, nor the code you have shown.  It sounds entirely like a PC configuration issue, specifically your colleague's PC.  Please call Tech Support while you are sitting at your colleague's PC.  Do not confuse or muddle the issue by bringing up your AF SDK application as it would be a red herring.

            • Re: Can't find PI System via .NET AF SDK app

              I don't understand how this can be a 'red herring' if the SDK Utility can connect perfectly fine to the AF Server but the code cannot. How do you propose I describe this issue without referencing the AF SDK app?

                • Re: Can't find PI System via .NET AF SDK app

                  Hi Mark,


                  You are mixing up Asset Server (PISystem in AF SDK) with PI Data Archive (PISever in AF SDK).

                  PI System Management Tools connect against the PI Data Archive which is no proof that the client also has an Asset Server reference with "GL-SQL-02".


                  I suggest you use PI System Explorer (PSE) on your colleagues notebook to verify the known servers table for known Asset Servers and PI Data Servers. PSE -> File -> Connections



                  By the way, part of the issue is indeed your class AfConnectionHelper turning the known servers table represented by the PISystems object into a read-only. Without doing that, the missing server would have probably be added automatically.