Databases andProgramIt is divided into two computers (both of which are xp_sp2). When connecting to the database, an error occurs.
The error message is as follows:
An error occurred while establishing a connection with the server. When you connect to SQL Server 2005, the default setting does not allow remote connection to SQL Server may cause this failure. (Provider: named pipeline provider, error: 40-unable to open the connection to SQL Server)
Solution:
1. Find the information on the Internet and try debugging.
See: http://soso.cnblogs.com/archive/2006/05/23/406937.html
After debugging, you still cannot connect to the database.
Open IIS properties-virtual directory properties-select Asp.net 2.0-click 'edit configuration'-delete all items connected to sqlexpress
Of course, it is best to delete the global configuration,
Open IIS properties-site properties-select Asp.net 2.0-click 'edit global configuration'
-Delete All sqlexpress connection items
Connection Failed!
2. Open the firewall port (use the default firewall xp_sp2 ). Connection successful!