VERIFIED SOLUTION i

Portrait Dialogue HQ integation fails if one of the parameters in the "Internal URLs" parameter collection in Dialogue Admin is blank

Issue

In installations of Portrait Dialogue (PD) version 6 with HQ integration, HQ reports errors (like those below) when launched. 

An error is observed saying "HQ was unable to retrieve application settings"

Additional details of the error can be found in the Portrait Shared Server (PSS) logs.
The exact location of the PSS logs can vary with each installation, but they are normally located in "C:\Program Files (x86)\PST\Portrait Shared Server\Portrait Shared Services\Logfiles".

If you inspect Portrait Shared Server (PSS) log file the you will find the following error:

"Error during GetApplicationSettings for User 'unknown'. System.InvalidOperationException: The parameter collection value must have an actual value."

Here is an example from a PSS log:

Error during GetApplicationSettings for User 'unknown'. System.Net.WebException: Unable to communicate with the web service. Please check if the Dialog Server API URL is correct (serviceBaseLocation attribute in Config/MH.DataAccessLayer.config)
   at MH.DataAccessLayer.ServiceProxies.WebServiceUtilities.ThrowExceptionIfDialogServerCommunicationFailure(WebException exception) in d:\Build\Campaign Management\Main.NetCI\Sources\Main\DataAccessLayer\ServiceProxies\WebServiceUtilities.cs:line 32
   at MH.DataAccessLayer.ServiceProxies.SystemServiceProxy.MH.DialogServerApi.ApiServiceContracts.ISystemApiService.Login(String instanceName, String userName, String password, String applicationSystem) in d:\Build\Campaign Management\Main.NetCI\Sources\Main\DataAccessLayer\ServiceProxies\SystemServiceProxy.cs:line 201
   at MH.DataAccessLayer.Services.SystemService.Login(String instanceName, String userName, String password, String applicationSystemName) in d:\Build\Campaign Management\Main.NetCI\Sources\Main\DataAccessLayer\Services\SystemService.cs:line 209
   at MH.DataAccessLayer.Services.Decorators.SystemServiceDecoratorBase.Login(String instanceName, String userName, String password, String applicationSystemName) in d:\Build\Campaign Management\Main.NetCI\Sources\Main\DataAccessLayer\Services\Decorators\SystemServiceDecoratorBase.cs:line 360
   at Portrait.Mas.Cms.Services.SessionServices.PcmAuthenticate.GetPcmSessionWithDialogLogin(String userName, String instance, String password, String application) in c:\UMD\Moneypenny\CMS\Services\SessionServices\PcmAuthenticate.cs:line 223
   at Portrait.Mas.Cms.Services.SessionServices.PcmAuthenticate.ActionOriginalLoginLogic(String userName, String instance, String password, String application) in c:\UMD\Moneypenny\CMS\Services\SessionServices\PcmAuthenticate.cs:line 186
   at Portrait.Mas.Cms.Services.SessionServices.PcmAuthenticate.SystemLogOn(String instance, String userName, String password, String application) in c:\UMD\Moneypenny\CMS\Services\SessionServices\PcmAuthenticate.cs:line 150
   at Portrait.Mas.Cms.Services.SessionServices.PcmAuthenticate.GetSystemLogin() in c:\UMD\Moneypenny\CMS\Services\SessionServices\PcmAuthenticate.cs:line 330
   at Portrait.Mas.Cms.Services.SessionServices.PcmSettingsService.BuildApplicationSettings(State state) in c:\UMD\Moneypenny\CMS\Services\SessionServices\PcmSettingsService.cs:line 53
   at Portrait.Mas.Cms.Services.SessionServices.SessionService.GetApplicationSettings(State& state) in c:\UMD\Moneypenny\CMS\Services\SessionServices\SessionService.cs:line 286

Cause

The cause was found to be the DashboardURL parameter in the Internal URLs collection within Dialog Admin.
If this is set to blank, which is normal if the dashboard is disabled and not used, connecting to HQ fails.


If the dashboard Enabled parameter is set to FALSE, the code still validates that ALL the URL's are populated, including the Dashboard.  
It is easy to reproduce. Just blank out this parameter, recycle the Application pool and launch HQ I wouldn’t have thought this is relevant for HQ, but it appears that it is.

 

Resolution

UPDATED: April 10, 2017
This has been fixed in HQ version 2.1
A
 workaround is to insert a URL into this parameter.