Avatar of limct
limct
 asked on

rovider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

Hi, I have installed and reinstalled express sql 2005 with success but I am getting above error when I run on my asp.net 2.0 project. The Express SQL 2005 is residing on my local machine. My connection string is:
 Data Source=(local)\SQLEXPRESS;Initial Catalog=xxx;User Id=xuser;Password=password; Trusted_Connection=True

I have visited many times the "SQL Configuration Manager" and "Surface Area Configuration for Services and Connections" with following the instructions I browsed through EE's knowledge database but still without success.

Can someone help me please?
MySQL ServerMicrosoft SQL ServerMicrosoft SQL Server 2005

Avatar of undefined
Last Comment
limct

8/22/2022 - Mon
appari

try this connectionstring
Data Source=(local)\SQLEXPRESS;Initial Catalog=xxx;Integrated Security=False;User id=xuser;Password=password;
limct

ASKER
No gd.....still getting the same error.
Raja Jegan R

Try out the steps given below:

1. Make sure SQL SERVER is up and the instance you try to connect is running.
2. Make sure you have an exception for Port no 1433 in your Windows Firewall.
3. Go to Computer Management >> Service and Application >> SQL Server 2005 Configuration >> Network Configuration.
4. Enable TCP/IP protocol. Make sure that SQL SERVER port is by Default 1433.

Go through the steps given in this article too if above is not successful:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
limct

ASKER
I tested my SQL connection and found it threw an exception of type 'System.InvalidOperationException' what should i do now please?
limct

ASKER
I have the settings as rrjegan1 mentioned but still getting the error. Please help.
ASKER CERTIFIED SOLUTION
limct

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.