Connection Strings should not contain "localhost"

Applies to Infiniti v8.6 or later

 

When installing Infiniti V8.x.x.xx, the connection string to the database should be defined without using "localhost" - even though the Web Service, SQL Server and Infiniti Instance may all be located on the same Server.  There is some legacy code, that is called by the License Management pages, that doesn't support connection strings of "localhost".

 

Correct Connection String



1. Using the Machine's Hostname : A Machine Hostname is a label that is assigned to a device connected to a computer network and that is used to identify the device to all other resources using this network. In the example below, the Hostname of the SQL Database Server is 'Example.com.au':

 

<add name="ConnectionString" connectionString="Provider=SQLOLEDB.1;Persist Security Info=False;Initial Catalog=xxxxxxxxx;Data Source=example.com.au;User Id=******;Password=******; " providerName="System.Data.OleDb" />


2. Using a Machine's IP Address : An IP Address is a numeric label assigned to each device on the designated network that uses the Internet Protocol to communicate with other devices and resources. In the example below, the IP Address of the SQL Database Server is 123.456.789.123:

<add name="ConnectionString" connectionString="Provider=SQLOLEDB.1;Persist Security Info=False;Initial Catalog=xxxxxxxxx;Data Source=123.456.789.123;User Id=******;Password=******; " providerName="System.Data.OleDb" /
 

Incorrect Connection String



1. Using "localhost" : In networking parlance, "localhost" is used to indicate the current machine (this computer). On most systems, "localhost" resolves to 127.0.0.1. While the Web Service, SQL Database Server and Infiniti Instance may all reside on the same physical server or VM, "localhost" should not be used in the connection string even though its technically valid. As mentioned, this is due to the License Management page NOT supporting the usage of "localhost". See the example below:

 

<add name="ConnectionString" connectionString="Provider=SQLOLEDB.1;Persist Security Info=False;Initial Catalog=xxxxxxxxx;Data Source=localhost;User Id=******;Password=******;" providerName="System.Data.OleDb" />

Related Articles

 

 

Keywords

 

connection strings local host ip hostname