Configure ARL import to use proxy server without using Internet Explorer settings
When using a proxy server in your environment, you typically configure this in Internet Explorer (IE). The mgsimportrecognition.exe tool uses the IE settings. However, there are cases where you might not be able to use the proxy in IE, such as when another application won't work through the proxy.
If this is the case, you will need to manually enter the proxy server using the -ps switch in mgsimportrecognition.exe. For example:
mgsimportrecognition.exe -ps <ProxyServer>:<ProxyPort> -pu <ProxyUsername> -pp <ProxyPassword>
The proxy username and password may not be required, depending on your configuration. Once the command has been run once with the -ps, -pu, and -pp switches, it should save the configuration so that next time it works by just running the executable.
The configuration settings are saved in the following registry key:
KEY_LOCAL_MACHINE\SOFTWARE\ManageSoft Corp\ManageSoft\Compliance\CurrentVersion
If you are running a 64-bit version of Windows, the registry key is:
KEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ManageSoft Corp\ManageSoft\Compliance\CurrentVersion
If you are unsure about or need to know the proxy username or port previously configured in IE for the content libraries, you can use the following short script in an administrative PowerShell session:
netsh winhttp show proxy
$client = new-object System.Net.WebClient
$client.Proxy.GetProxy("https://")
Common error
You may receive the following error:
[ERROR] System.UriFormatException: Invalid URI: The hostname could not be parsed.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Net.WebProxy.CreateProxyUri(String address)
at ManageSoft.Compliance.Logic.Core.Impl.Licensing.RecognitionImport.ContentUtilities.ProxyFromComplianceConf()
at ManageSoft.Compliance.Logic.Core.Impl.Licensing.RecognitionImport.ContentImport.get_Downloader()
at ManageSoft.Compliance.Logic.Core.Impl.Licensing.RecognitionImport.ContentImport.Run(EARLImportMode mode, String groupName)
at ManageSoft.Compliance.Console.RecognitionImportTool.ImportRecognition()
2023-03-08 11:22:15,188 [.RecognitionImportTool] [ERROR] Invalid URI: The hostname could not be parsed.
This error can be resolved by configuring your proxy within RegEdit. The correct format should resemble the following:
http://proxy.example.com:port