Groups | Blog | Home
all groups > asp.net > august 2006 >

asp.net : ASP.NET 2.0 and connection to remote SQL 2000 server


Henry
8/5/2006 2:02:46 PM
Try changing the connection string to reflect the actual address to server,
that may include changing that information in the web.config file...

This is my connection string:

Server=ADDRESS TO SERVER!;Database=SOX;User ID=userxxx;Password=******;

[quoted text, click to view]

Mitya Mitriev
8/5/2006 11:06:09 PM
Hi
I created ASP.NET 2.0 web application that uses SQL Server 2000 database and
it works perfectly when website and Sql server were on local machine.

Then I installed application on production server. Database is placed on
another server.
I received the error:
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)

Why it thinks I am trying to connect to SQL Server 2005 ? There is no any
2005 server on remote server!

This is my connection string:
Server=servername;Database=SOX;User ID=userxxx;Password=******;

Query Analyzer and Enterprise Manager connect perfectly (when installed on
production server) to database server! Then I created small console
appplication which uses the same data layer as web application (and
connection string ) - it connected to remote database too! Only ASP.NET
2.0 application couldn't connect to remote Sql server 2000.

Can anyone help?

Patrick.O.Ige
8/6/2006 12:00:00 AM
Mitya i think you might need to take some additional steps
See this page at :http://www.datamasker.com/SSE2005_NetworkCfg.htm
Hope that helps
Patrick


[quoted text, click to view]

Mitya Mitriev
8/6/2006 12:00:00 AM
Thank you, but I use Sql Server 2000.

[quoted text, click to view]

Mitya Mitriev
8/6/2006 1:23:32 AM
Do you mean IP address? I tried, it didn't help :(

[quoted text, click to view]

Peter Bromberg [C# MVP]
8/6/2006 11:40:02 AM
You have to make sure that the remote server is not "Hidden" which would
prevent a remote connection; also check that BOTH Sql Server and Windows
Authentication are enabled.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




[quoted text, click to view]
AddThis Social Bookmark Button