Error 7 - A network-related or instance-specific error occurred while establishing a connection to SQL Server. AdvancePro ClickOnce

 
 
ERROR MESSAGE
Error 7: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The remote computer refused the network connection.)



After clicking OK, another error message pops up:

ERROR MESSAGE
Error 8: Object reference not set to an instance of an object.



SOLUTION

Open the SQL Server Configuration Manager

Windows Start Button >> Run Program
- or -
Windows Button + R

Enter C:\Windows\System32\SQLServerManager11.msc

Click OK



Look for SQL Server (ADVANCEPRO) under SQL Server Services and check its State
If its State is 'Stopped' or Red, right click on it and hit 'Start'
Wait for it to finish loading and it will turn Green/ State: Running