ASP .net 1.2 connect to SQL

P

patrick_keton

I am trying to connect to a dabase located on server 2 from my asp.net
1.2 web pages located on server 1

Am using following connection string:

"Integrated Security=SSPI;Persist Security Info=False;User
ID=myuid;Password=mypass;Initial Catalog=mydb;Data Source=myserver"

Error returned by Server 2 is

Message: 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)
Line Number: 0
Source: .Net SqlClient Data Provider
Procedure:

Is there something wrong with my code.
Please advice
 
C

Cowboy \(Gregory A. Beamer\)

Simple:

1. Make sure you have a protocol you can talk to. By default, some versions
of SQL Server use in-memory only. Add a protocol like TCP using the SQL
Configuration tool.
2. Turn on the SQL Browser service in the services administration tool and
make sure it is set to start automatically when you reboot after patches.

After that, you should have no issues. Juan has also posted a link to a KB
article that has more detail.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top