User hit error 1001: Index and length must refer to a location within the string.Parameter name: length

When try to install Xin Inventory 2.0. 

To solve it, 
Go to Programs -> Microsoft SQL Server 2008 or similar version -> Configuration Tools -> SQL Server Configuration Manager

1.  Enable MSSQL Browser

  • In SQL Configuration Manager, click on SQL Server Services (refer to print screen below)

  • Right Click on SQL Server Browser
  • Click on PropertiesSQL Server Browser Properties windows will be popup.
  • Click on Service tab (refer to print screen below)

  • Change the Start Mode to Automatic
  • Click on OK button
  • Now Right Click on SQL Server Browser (refer to print screen below)

  • Click on Start to make sure SQL Server Browser is in Running State.
  • Done

2.  Enable MSSQL TCPIP

Expend SQL Server Network Configuration and click on Protocols for SQLEXPRESS or similar

Right click on TCP/IP and Click on Enable.