If a client computer connects to the internet via a Proxy Server that requires authentication, you must configure QLM to use the proxy server by setting the following properties:
- UseProxy, ProxyUser, ProxyDomain, ProxyPassword, ProxyHost, ProxyPort
After these properties are set, you can call any API that communicates with the QLM License Server.
To detect that the customer requires authentication through a proxy server, you need to catch the exception that is thrown when the QLM API fails.
try
{ license.ActivateLicense(...);
}
catch (System.Net.WebException wex)
{ if (wex.Message.IndexOf("407") != -1)
{
// Customer user proxy server that requires authentication.
// Configure the proxy settings - it is not recommended to put all this code in the catch clause - this is just to show you what APIs to call
license.UseProxy = true;
license.ProxyUser = "xxx";
license.ProxyPassword= "***";
license.ProxyDomain = "yyy";
license.ProxyHost= "zzz";
license.ProxyPort= 8080;
license.ActivateLicense (...);
}
else
{
// error
return;
}
}
catch (Exception ex)
{
// error
return;
}
Comments
0 comments
Article is closed for comments.