473,761 Members | 8,011 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET 2.0 connecting to SQL Server 2000

Windows Server 2000
ASP.NET 2.0
SQL Server 2000 (on a physically seperate server)

I moved an ASP.NET 2.0 application from a development server to production,
and am getting the following error:

System.Data.Sql Client.SqlExcep tion: 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)

This app works fine on a development machine and a development server
hitting an SQL 2000 Server.

I went back to the development server and changed the web.config connection
string to point to the production SQL 2000 Server, and it works fine, so I am
pretty sure the issue is on the production web server. I am using a very
simple connection string:

Data Source=serverna me;Initial Catalog=catalog ;User Id=xxxxx;Passwo rd=xxxxx;

I have tried replacing the DataSource as an IP address, with no luck. I
have tried putting 'np:' on the front to force named pipes, with no luck.

This seems to be a very popular issue when I do searches for this error
message. Any help would be GREATLY apprecaited!

Todd
Sep 9 '06 #1
6 7776
Hi Todd,

You've probably checked but just in case...

Are you sure that the web.config that contains your data connection string
is the one that is actually executing? Be sure that the web is set as an
application in IIS, otherwise a web.config higher up might be the one that's
being used.

Ken
Microsoft MVP [ASP.NET]

"Todd Brewer" <To********@dis cussions.micros oft.comwrote in message
news:6F******** *************** ***********@mic rosoft.com...
Windows Server 2000
ASP.NET 2.0
SQL Server 2000 (on a physically seperate server)

I moved an ASP.NET 2.0 application from a development server to
production,
and am getting the following error:

System.Data.Sql Client.SqlExcep tion: 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)

This app works fine on a development machine and a development server
hitting an SQL 2000 Server.

I went back to the development server and changed the web.config
connection
string to point to the production SQL 2000 Server, and it works fine, so I
am
pretty sure the issue is on the production web server. I am using a very
simple connection string:

Data Source=serverna me;Initial Catalog=catalog ;User
Id=xxxxx;Passwo rd=xxxxx;

I have tried replacing the DataSource as an IP address, with no luck. I
have tried putting 'np:' on the front to force named pipes, with no luck.

This seems to be a very popular issue when I do searches for this error
message. Any help would be GREATLY apprecaited!

Todd

Sep 9 '06 #2
Todd,

Are you sure there is network connectivity between your production web
server and your test sql server? More than likely there is a firewall
blocking the connection. On the production server trying pinging the test
sql server. From the production server try "telnet testsqlserverna me 1433"..
does the screen clear or do you get an error message?

Regards,

Rob
"Todd Brewer" <To********@dis cussions.micros oft.comwrote in message
news:6F******** *************** ***********@mic rosoft.com...
Windows Server 2000
ASP.NET 2.0
SQL Server 2000 (on a physically seperate server)

I moved an ASP.NET 2.0 application from a development server to
production,
and am getting the following error:

System.Data.Sql Client.SqlExcep tion: 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)

This app works fine on a development machine and a development server
hitting an SQL 2000 Server.

I went back to the development server and changed the web.config
connection
string to point to the production SQL 2000 Server, and it works fine, so I
am
pretty sure the issue is on the production web server. I am using a very
simple connection string:

Data Source=serverna me;Initial Catalog=catalog ;User
Id=xxxxx;Passwo rd=xxxxx;

I have tried replacing the DataSource as an IP address, with no luck. I
have tried putting 'np:' on the front to force named pipes, with no luck.

This seems to be a very popular issue when I do searches for this error
message. Any help would be GREATLY apprecaited!

Todd

Sep 9 '06 #3
Hi Todd

I've got exactly the same problem. I tried really a lot of
possibilities to find a workaround, but could not find a working
solution.
I wonder if this problem is not known at Microsoft...
Anyway... I keep on trying and if I find a way to go I'll let you know

Best regards

Urban

Todd Brewer schrieb:
Windows Server 2000
ASP.NET 2.0
SQL Server 2000 (on a physically seperate server)

I moved an ASP.NET 2.0 application from a development server to production,
and am getting the following error:

System.Data.Sql Client.SqlExcep tion: 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)

This app works fine on a development machine and a development server
hitting an SQL 2000 Server.

I went back to the development server and changed the web.config connection
string to point to the production SQL 2000 Server, and it works fine, so I am
pretty sure the issue is on the production web server. I am using a very
simple connection string:

Data Source=serverna me;Initial Catalog=catalog ;User Id=xxxxx;Passwo rd=xxxxx;

I have tried replacing the DataSource as an IP address, with no luck. I
have tried putting 'np:' on the front to force named pipes, with no luck.

This seems to be a very popular issue when I do searches for this error
message. Any help would be GREATLY apprecaited!

Todd
Sep 11 '06 #4
re:
>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.
I wonder if this problem is not known at Microsoft...
It is known...and there's a KB with instructions :

http://support.microsoft.com/default...b;EN-US;914277


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
<ur*********@gm ail.comwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
Hi Todd

I've got exactly the same problem. I tried really a lot of
possibilities to find a workaround, but could not find a working
solution.
I wonder if this problem is not known at Microsoft...
Anyway... I keep on trying and if I find a way to go I'll let you know

Best regards

Urban

Todd Brewer schrieb:
>Windows Server 2000
ASP.NET 2.0
SQL Server 2000 (on a physically seperate server)

I moved an ASP.NET 2.0 application from a development server to production,
and am getting the following error:

System.Data.Sq lClient.SqlExce ption: 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)

This app works fine on a development machine and a development server
hitting an SQL 2000 Server.

I went back to the development server and changed the web.config connection
string to point to the production SQL 2000 Server, and it works fine, so I am
pretty sure the issue is on the production web server. I am using a very
simple connection string:

Data Source=serverna me;Initial Catalog=catalog ;User Id=xxxxx;Passwo rd=xxxxx;

I have tried replacing the DataSource as an IP address, with no luck. I
have tried putting 'np:' on the front to force named pipes, with no luck.

This seems to be a very popular issue when I do searches for this error
message. Any help would be GREATLY apprecaited!

Todd

Sep 11 '06 #5
There's very explicit instructions covering asp.net 2.0/sql server 2000
data connections in this blog entry by Scott Guthrie :

http://weblogs.asp.net/scottgu/archi...25/423703.aspx


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
<ur*********@gm ail.comwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
Hi Todd

I've got exactly the same problem. I tried really a lot of
possibilities to find a workaround, but could not find a working
solution.
I wonder if this problem is not known at Microsoft...
Anyway... I keep on trying and if I find a way to go I'll let you know

Best regards

Urban

Todd Brewer schrieb:
>Windows Server 2000
ASP.NET 2.0
SQL Server 2000 (on a physically seperate server)

I moved an ASP.NET 2.0 application from a development server to production,
and am getting the following error:

System.Data.Sq lClient.SqlExce ption: 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)

This app works fine on a development machine and a development server
hitting an SQL 2000 Server.

I went back to the development server and changed the web.config connection
string to point to the production SQL 2000 Server, and it works fine, so I am
pretty sure the issue is on the production web server. I am using a very
simple connection string:

Data Source=serverna me;Initial Catalog=catalog ;User Id=xxxxx;Passwo rd=xxxxx;

I have tried replacing the DataSource as an IP address, with no luck. I
have tried putting 'np:' on the front to force named pipes, with no luck.

This seems to be a very popular issue when I do searches for this error
message. Any help would be GREATLY apprecaited!

Todd

Sep 11 '06 #6
Also verify you connection string is proper and you have connectivity
to the test sql server from the machine by building a .udl file and
doing a test. The .udl will allow you to more easily make tweaks
instead of continuing to change your web.config, and will test the
connectivity to the SQL server as opposed to just checking access to
the machine via a ping request.

You can look at this for an example...

http://www.ctrlalt313373.com/DavidsB...3/Default.aspx
Juan T. Llibre wrote:
There's very explicit instructions covering asp.net 2.0/sql server 2000
data connections in this blog entry by Scott Guthrie :

http://weblogs.asp.net/scottgu/archi...25/423703.aspx


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
<ur*********@gm ail.comwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
Hi Todd

I've got exactly the same problem. I tried really a lot of
possibilities to find a workaround, but could not find a working
solution.
I wonder if this problem is not known at Microsoft...
Anyway... I keep on trying and if I find a way to go I'll let you know

Best regards

Urban

Todd Brewer schrieb:
Windows Server 2000
ASP.NET 2.0
SQL Server 2000 (on a physically seperate server)

I moved an ASP.NET 2.0 application from a development server to production,
and am getting the following error:

System.Data.Sql Client.SqlExcep tion: 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)

This app works fine on a development machine and a development server
hitting an SQL 2000 Server.

I went back to the development server and changed the web.config connection
string to point to the production SQL 2000 Server, and it works fine, so I am
pretty sure the issue is on the production web server. I am using a very
simple connection string:

Data Source=serverna me;Initial Catalog=catalog ;User Id=xxxxx;Passwo rd=xxxxx;

I have tried replacing the DataSource as an IP address, with no luck. I
have tried putting 'np:' on the front to force named pipes, with no luck.

This seems to be a very popular issue when I do searches for this error
message. Any help would be GREATLY apprecaited!

Todd
Sep 12 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1429
by: JA | last post by:
Hi, I am total newbie to SQL Server. My new host tells me I can connect through AccessXP or 2002. I have Access 2000. Can I not connect with that also? Thanks, JA
3
3003
by: Ann Marinas | last post by:
Hi there, I am currently developing an ASP.NET program that connects to a SQL Server 2000 database. I also have SQL Server 2005 Express installed on the same local machine. Prior to installing SQL Server 2005, my apps were working and is connecting flawlessly to a database on the SQL Server 2000. Now, whenever I connect to the same database with the 2005 version installed, I keep on getting this error:
9
2702
by: RvGrah | last post by:
After much hair-pulling, I've finally found the answer to a problem that many are fighting with, difficulty connecting from Sql 2005 Server Management or VS2005 to a remote Sql Server running Sql 2000. In my case the server I couldn't reach was across a vpn connection, behind ISA server 2000, (which had port 1433 open). The answer was in this post:...
3
2013
by: Vinod R.Shenoy | last post by:
Hi All, Came across a post wherin you had helped somebody with a similar problem and was wondering if you could help us out with it. Our problem is , We have a development SQL Server 2000 (running on Win2K SP4) machine that we want to run on a Windows 2003 server machine and access it via our internal LAN. We have opened the firewall to allow our applications
3
2624
by: Chris | last post by:
Don't know if there is a simple solution for this one or not. When running SQL server on a machine with 2000 loaded and the complete SQL package I don't have any issues. Now I'm trying to login using my XP machine with MSSQL developer edition, and I can not connect to my remote servers via TCP/IP. It can see the server, and it establishes a connection, but I can't access my files, and the connection seems incredibly slow. I have checked my...
1
1605
by: =?Utf-8?B?TmVpbCBQYWRkb2Nr?= | last post by:
Using asp.net in Visual Studio 2005, we are getting an error message when trying to connect to an existing SQL 2000 database.. This has only hapenned since we installed the SQL 2005 client tools. The error is: "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....
7
6565
by: TerpZebra | last post by:
I am having difficulty connecting to SQL Server 2000 on one of our servers via a VB6 program on Vista. I can connect fine to a different server, but it gives me the following error with the server in question: "Unable to connect to database. Please check your internet connection Error# -2147467259 SQL Server does not exist or access denied"
3
5747
by: Me LK | last post by:
I did a search but could not find an aswer that worked so here it goes. I just did an upgrade from 2003 to vs 2005 express. I am using a remote sql server 2000. I specifically upgrade to make use of the login control. Everything upgraded fine and the site is working on my local machine. It seems that my site is trying to connect to a local database. I need it to attach to a remote database. I added a connection string to
2
3045
by: orandov | last post by:
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to connect via SQL Management Studio to the database server from the application server I get the same error. Here is the error:
0
9554
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9376
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9988
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9923
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8813
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.