Provider: named pipeline provider, error: 40, providererror
An error occurred while establishing a connection to 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)Note:An error occurred while executing the current Web request. Check the stack trace information for details about the error and the source of the error in the code.
Exception details:System. Data. SqlClient. SqlException: 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)
I haven't run SqlServer for a long time. Today I made a stupid mistake:
If the service is not started, don't laugh. Open the service command: net start mssqlserver; close the service: net stop mssqlserver.