ASP.NET SQL – Win32Exception (0×80004005): The system cannot find the file specified 0×80131904

PROBLEM:

Win32Exception (0×80004005): The system cannot find the file specified 0×80131904
(provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)

SOLUTION:

The Error 40 indicate that can’t open a connection to the SQL Server but it was able to locate a SQL Server on the GEORGE-SQL server.

The instance name was missing from the connection string. Happen to be that this server has two installation of Microsoft SQL Server. The one that I was using is a SQL Express and its instance is SQLSERVER.

Incorrect connection string:
<add name=”CS” connectionString=”Data Source=<strong>GEORGE-SQL</strong>;Initial Catalog=DATABASE1;Persist Security Info=True;User ID=sa;Password=P@ssword” providerName=”System.Data.SqlClient” />

Corrected connection string:
<add name=”CS” connectionString=”Data Source=<strong>GEORGE-SQL\SQLEXPRESS</strong>;Initial Catalog=DATABASE1;Persist Security Info=True;User ID=sa;Password=P@ssword” providerName=”System.Data.SqlClient” />

by George Lopez-Henriquez
www.inetnj.com

Comments are closed.