Q204512: The ConnectionString property has not been initialized error on Remote Console login


On logging into remote console, you receive the error:
System.InvalidOperationException: The ConnectionString property has not been initialized.
 at System.Data.SqlClient.SqlConnection.PermissionDemand()
 at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection)
 at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
 at System.Data.SqlClient.SqlConnection.Open()
 at ManageSoft.Database.DatabaseConnection.Open()
 at ManageSoft.Database.Impl.DatabaseLayerBaseSql.ConnectionOpen()
 at ManageSoft.Database.Impl.DatabaseLayerBaseSql.GetResult(IDatabaseObjectFactory p_ObjectFactory, CommandType p_CommandType, String p_CommandText, DatabaseParameter[] p_Parameters)
 at ManageSoft.Database.Impl.DatabaseLayerBase.GetResult(IDatabaseObjectFactory p_ObjectFactory, String p_StoredProcedure, DatabaseParameter[] p_Parameters)
 at ManageSoft.Database.Impl.ResourceTable.GetByName(String p_ResourceName)
 at ManageSoft.Rights.Impl.RightsImpl.GetPermissionRequest(String p_Resource, String p_Value, String p_Action)
 at ManageSoft.DiscoveryBrowser.ResultsPane.AccessRightsVerifier.CanViewDiscovery()
 at ManageSoft.DiscoveryBrowser.ResultsPane.DiscoveryBrowserPane.OnLoad(EventArgs e)
 at System.Windows.Forms.UserControl.OnCreateControl()
 at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
 at System.Windows.Forms.Control.CreateControl()
 at System.Windows.Forms.Control.WmShowWindow(Message m)
 at System.Windows.Forms.Control.WndProc(Message m)
 at System.Windows.Forms.ScrollableControl.WndProc(Message m)
 at System.Windows.Forms.ContainerControl.WndProc(Message m)
 at System.Windows.Forms.UserControl.WndProc(Message m)
 at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message m)
 at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message m)
 at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)



System.InvalidOperationException: The ConnectionString property has not been initialized.

This means that it cannot access the Connection String property in the registry and there are 2 main causes for this:

  1. Access to the [HKLM\...] registry keys is blocked to remote users, in Local / Global policy MGS Administrators (which the account should be part of) need access to logon locally. More information on the registry restrictions can be found: http://support.microsoft.com/kb/892192
  2. In some rare cases this can be caused by the agent and server being on different bit Operating Systems e.g. agent on 64 bit and server on 32 bit or vice versa. The reason for this is that the registry keys are stored in different locations i.e. [HKLM\Software\Wow6432Node\ManageSoft Corp] for 64 bit machines and [HKLM\Software\ManageSoft Corp] for 32 bit. In this instance the ManageSoft Corp key on the server needs copying to the other location though this is rare.


The resolution is split into 2 parts to correspond with the 2 causes:
  1. Allow remote users access to registry (can set it for specific groups e.g. MGS Compliance Users)
  2. Copy the \ManageSoft Corp\ key into the alternative registry location so that it exists in both places e.g. copy \Software\ManageSoft Corp\ key into Software\Wow6432Node\


Powered by Zendesk