Failed to login the license server

When running the installable cloud app, the Web API console displays the following error:

2021-01-27 01:28:32,240 ERROR PowerServer.Client.PowerServerClient.LogMessage [0] - MESSAGE: License Exception: Failed to login the 
license server. (Invalid_client) at PowerServer.SessionFacade.CreateSessionIdAsync(String appName, String clientEncryptString, 
CancellationToken cancellationToken))

Cause & Solution:

The "invalid-client" error occurs because the license code is invalid or the license code cached in the system has expired. Please try the following:

  1. Check the license code included in the PowerServer project matches the one you obtained from the Appeon website;

  2. Clear the PowerServer cache and then build and run the Web APIs again;

    To clear the PowerServer cache, go to %SystemDrive%\Users\[username]\.nuget\packages, and delete the folders starting with "dwnet", "powerserver", "snapobjects", and "powerscript".

  3. Make sure that PowerServer is connecting to the correct license servers: https://apips.appeon.com and https://apipsoa.appeon.com, or https://apips.appeon.net and https://apipsoa.appeon.net. If not, update the PowerServer.Core and PowerServer.Api NuGet packages to the latest version.