Configuring the Protector

Configuring and Verifying AP .Net Installation on different platforms

Setting Up Environment Variables for AP .NET on Windows

This section describes the steps to configure environment variables required to run the Application Protector .NET application on a Windows platform.

To set up the environment variables on the Windows platform:

  1. On the machine where AP .NET is installed, navigate to Control Panel > System > Advanced system settings.
    The System Properties dialog box appears.

  2. Click Environment Variables.
    The Environment Variables dialog box appears.

  3. Select the Path variable and click Edit.
    The Edit Environment Variable dialog box appears.

  4. Click New.

  5. Add the path where the dotnetprovider.plm file is located.
    For example, specify the path as C:\Program Files\Protegrity\sdk\dotnet\lib.

  6. Click OK to save the changes.

    The environment variable is now set successfully.

Verifying Installation of AP .Net

To verify that the AP .Net has been successfully installed:

  1. Create a data element and data store in the ESA.
    For more information about creating data elements, refer to Working With Data Elements.
    For more information about creating data stores, refer to Creating a Data Store.

  2. Create a member source and role in the ESA.
    For more information about creating a member source, refer to Working With Member Sources.
    For more information about creating a role, refer to Working with Roles.

  3. Configure a policy in the ESA.
    For more information about creating a data security policy, refer to Creating Policies.

  4. Configure the application as a trusted application in the ESA.
    For more information about trusted applications, refer to Working With Trusted Applications.

  5. Initialize the AP .Net.
    For more information about the AP .Net initialization API, refer to GetProtector API.

  6. To verify the version of the installed AP .Net, run the GetVersion method using the following code:

    using System;
    using System.Collections.Generic;
    using System.Text;
    using Protegrity.Net;
    using Protegrity.PException;
    
    namespace APDotNetTest
    {
        class Program
        {
            static void Main(string[] args)
            { 
                try
                {
                    using Protector protector = Protector.GetProtector();
    
                    /**
                    * Calling GetVersion to print APDotNet sdk and Core version.
                    */
                    Console.WriteLine(protector.GetVersion() + "\n");
                }
                catch (ProtectorException e)
                {
                    Console.WriteLine(e);
                }
            }
        }
    }
    

Last modified : December 18, 2025