I have a machine with Windows 7 and SQL Server 2008 R2.
With my application I can't connect to SQL Server from 2 PC,
1 with Windows 7
1 with Windows 10
I receive the same error:
Named Pipes Provider, error 40 - Could not open a connection to SQL Server
I have another machine in the same LAN with Windows XP and it can connect to SQL Server without problem.
The connection string is:
connectionString="Password=xxxx;Persist Security Info=True;User ID=xxxx;Initial Catalog=REPORTDB;Data Source=NW03SH02;Integrated Security=False"
The machine with SQL Server is named: NW03SH02 and the instance of SQL Server is named NW03SH02.
EDIT:
The solution isn't in other discussions of StackOverflow.
Now the connection with database works fine. I have to changed parameter Data Source in connection string from name of PC with SQL Server to IP of PC with SQL Server.