Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Export this certificate to a file using the default export settings (do not include . You will need to export this file twice, once without the private key, and once with the private key (supply a password when exporting with the private key). Copy this the non-private-key file over to the gateway host and install it into the “Trusted People” store of the Local Computer. This can be achieved by right clicking the certificate file (on the gateway host) and choosing the “install certificate” option.

...

Next, reference the C# client library (Connexion.Gateway.Api.dll, both framework and core assemblies are available) and create a proxy to the gateway. You will need the System.ServiceModel.Primitives and System.ServiceModel.Http packages if you’re targeting .NET core. You will supply the exported certificate with the private key in this method.

Code Block
breakoutModewide
languagec#
using System.Security.Cryptography.X509Certificates;
using Connexion.Gateway.Api;

namespace GatewayApiClientTest
{
    class Program
    {
        static async voidTask Main(string[] args)
        {
            // load the certificate to pass to the gateway api
            var certificate = new X509Certificate2(@"c:\gatewayClienttest\NickLaptop.cerapicert.pfx", "foobar");

            // create a proxy to the GW
            using (var proxy = GatewayApiProxyFactory.CreateProxy("192127.1680.30.191", 80858086, certificate))
            {
                // test the connection
                Console.WriteLine("Calling Query Groups...");
                var response = await proxy.ServiceMethods.Ping();.QueryGroups(new QueryGroupsRequest());
                foreach (var group in response.Groups)
                {
                    Console.WriteLine(group.GroupName);
                }
            }

            Console.ReadLine();
        }
    }

At this point, you can now make API calls to create and modify non-authorized remote agents. In the future, we may enable specific updates to authorized remote agents.

...