Hi,
I am developing an ASP.NET 2.0 application and SQL Server 2000 as
back-end. The connection to DB works fine if I connect to my local or
our dev databases. It is giving me the error when I try to connect to
Test database. However, I am able to connect to the same database
through Enterprise Manager by using same credentials. I tried using
TCP/IP and named pipe connections.
I am using the following connection string.
Password=password;Persist Security Info=True;User ID=User;Initial
Catalog=db;Data Source=server\instance;Network Library=DBMSSOCN;"
I am getting the following errors.
When using TCP/IP connection:
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: TCP Provider, error: 0 - No connection could be
made because the target machine actively refused it.)
When using Named Pipes:
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)
Any help is appreciated.
Thanks,
SreedharIs this a 2000 instance with a SQL server 2005 instance running as well?
A SQL 2000 with .net connection should look like...
Standard Security:
"Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;User
Id=sa;Password=asdasd;"
a.. Trusted Connection:
"Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;Integrated
Security=SSPI;"
You might have some issues if you are running different instances so let me
know...
thanks,
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/
<sreedhardasi@.gmail.com> wrote in message
news:1158682323.098370.14170@.k70g2000cwa.googlegroups.com...
> Hi,
> I am developing an ASP.NET 2.0 application and SQL Server 2000 as
> back-end. The connection to DB works fine if I connect to my local or
> our dev databases. It is giving me the error when I try to connect to
> Test database. However, I am able to connect to the same database
> through Enterprise Manager by using same credentials. I tried using
> TCP/IP and named pipe connections.
> I am using the following connection string.
> Password=password;Persist Security Info=True;User ID=User;Initial
> Catalog=db;Data Source=server\instance;Network Library=DBMSSOCN;"
> I am getting the following errors.
> When using TCP/IP connection:
> 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: TCP Provider, error: 0 - No connection could be
> made because the target machine actively refused it.)
> When using Named Pipes:
> 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)
>
> Any help is appreciated.
> Thanks,
> Sreedhar
>|||No, only SQL Server 2000 is running on the server, but it has several
instances. I am using one of them.
I verified my connection string and it is similar to the string that
you provided, except that it has SQL server instance for Data Source.
Let me know if I can provide any additional information.
Thanks,
Sreedhar
Warren Brunk wrote:[vbcol=seagreen]
> Is this a 2000 instance with a SQL server 2005 instance running as well?
> A SQL 2000 with .net connection should look like...
> Standard Security:
> "Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;User
> Id=sa;Password=asdasd;"
> a.. Trusted Connection:
> "Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;Integrated
> Security=SSPI;"
> You might have some issues if you are running different instances so let m
e
> know...
> thanks,
> --
> /*
> Warren Brunk - MCITP - SQL 2005, MCDBA
> www.techintsolutions.com
> */
>
> <sreedhardasi@.gmail.com> wrote in message
> news:1158682323.098370.14170@.k70g2000cwa.googlegroups.com...|||Hopefully, it doesn't look like this: "Data Source=server\instance" because
that wouldn't work.
I noticed that was the connection string you originally submitted.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
<sreedhardasi@.gmail.com> wrote in message
news:1158695873.697272.313370@.i42g2000cwa.googlegroups.com...
> No, only SQL Server 2000 is running on the server, but it has several
> instances. I am using one of them.
> I verified my connection string and it is similar to the string that
> you provided, except that it has SQL server instance for Data Source.
> Let me know if I can provide any additional information.
> Thanks,
> Sreedhar
> Warren Brunk wrote:
>|||Thanks for your reply. Then, what would be the correct format?
Arnie Rowland wrote:[vbcol=seagreen]
> Hopefully, it doesn't look like this: "Data Source=server\instance" becaus
e
> that wouldn't work.
> I noticed that was the connection string you originally submitted.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> <sreedhardasi@.gmail.com> wrote in message
> news:1158695873.697272.313370@.i42g2000cwa.googlegroups.com...|||Replace the word 'server' with the actual name of your server, and the word
'instance' with the actual instance name of your SQL Server instance. If you
don't have a 'named' instance, then leave the slash and instance name off.
For example: "Data Source=MyComputer", or "Data Source=MyComputer\MSDE"
Each 'instance' is a separate SQL Server.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
<sreedhardasi@.gmail.com> wrote in message
news:1158698297.475884.293360@.k70g2000cwa.googlegroups.com...[vbcol=seagreen]
> Thanks for your reply. Then, what would be the correct format?
> Arnie Rowland wrote:
>
Thursday, February 9, 2012
ASP.NET 2.0 and SQL Server 2000 connection issue
Labels:
application,
asback-end,
asp,
aspnet,
connect,
connection,
database,
developing,
local,
microsoft,
mysql,
net,
oracle,
orour,
server,
sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment