When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections

When my default.aspx page loads I get this error for the connection to my SQL 2005 DB.   

 

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

I have already gone to Surface Area Configuration to ensure that Remoting with both Named Pipes or TCP/IP is enabled and it's set to both for remoting.

I verified that my local account has access to the DB.

Not sure what else to check.
 


When is Microsoft going to get rid of VB.NET!
0
dba123
1/22/2008 8:41:12 PM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

7 Replies
890 Views

Similar Articles

[PageSpeed] 13

Is this on the same box?  Are you sure it isn't a firewall issue?  Also, if you try your query with Query Analyzer does it work?


Please click Mark as Answer for helpful posts!

"Give a man a fish, and he eats for a day. Give him a fishing pole, he will eat for life."

--I'm still a script kiddie at heart.
0
mjnorman
1/22/2008 8:47:41 PM

 

I used to get that error when changing from dev server to production server, it typically because i forgot to alter my connection string such as "server=10.10.10.10" to "server =localhost" and visa vesra

0
kp8080028
1/22/2008 9:09:04 PM

Hi dba123 ,

Both mjnorman and kp8080028 's suggestion make sense. While as to a detailed soultion which you can follow,I woudl suggest you read this:

An error has occurred while establishing a connection to the server when connecting to SQL server 2005, this failure may be caused by the fact that under default settings SQL server does not allow remote connection. ( provider: Named Pipes Provider, error: 40 - could not open a connection to SQL server. )

Fix/Workaround/Solution:
Step 1) Make sure SQL SERVER is up and the instance you try to connect is running.
Step 2) Your system Firewall should not block SQL Server port.
Step 3) Go to Computer Management >> Service and Application >> SQL Server 2005 Configuration >> Network Configuration
Enable TCP/IP protocol. Make sure that SQL SERVER port is by Default 1433.
Step 4) Now follow this KB Article of MSDN depending on your server : http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277

Hope my suggestion helps


Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
0
Bo
1/27/2008 10:12:53 AM

 I am getting this error with an ASP.NET 2000 app and an SQL 2000 Server.

 

Thoughts? 

0
raynkel
7/31/2008 1:03:21 PM

Start with simple first.  Make sure that the user account your asp.net app is running under has permissions to your db.  You might need to check your IIS security settings to see which account it's running under.


Please click Mark as Answer for helpful posts!

"Give a man a fish, and he eats for a day. Give him a fishing pole, he will eat for life."

--I'm still a script kiddie at heart.
0
mjnorman
7/31/2008 1:09:12 PM

 Problem is it will work sometimes and sometimes not.

 

0
raynkel
7/31/2008 1:32:27 PM

I have the same error  but I can't do any of these solutions. Because I cant see sql server surface area configration.

can you please help me?

0
Mukerrem
8/7/2008 10:48:21 AM
Reply:

Web resources about - When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections - asp.net.sql-datasource

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
High-quality data, if not used properly, can still lead marketers to make bad decisions. Consider these common ways that numbers are used to ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

CareerSonar Turns Facebook Friends Into Job Connections
Looking for a job ? Among your Facebook friends lies the potential for employment. CareerSonar , a new service, brings together a person’s connections ...

Kings Cross identities arrested in connection with murder
Two Kings Cross identities have been arrested in connection with the murder of a man at Sydney hotel.

Faith: Spirits lift in connection with home
We need to more adequately understand the spirituality of our unique place on earth.

Governor declares state of emergency in connection with California methane leak
... of Emergency Services) On Wednesday evening, California Governor Jerry Brown declared a state of emergency in Los Angeles County in connection ...

Tons Of Methane Are Spewing Out Of California, And There’s A Connection To The Governor
The out of control leak has forced thousands of residents to flee their homes. Gov. Brown's sister is a paid board member at the company that ...

Report: Man arrested in connection with Ashley Olsen's murder
Italian media agency reports that a non-EU male has been arrested in the murder of the 35-year-old American

Toyota and Kymeta rely on satellites to power this Mirai's data connection
They're hoping to achieve gigabit wireless speeds within the next few years.

Resources last updated: 1/18/2016 1:30:18 AM