Friday, February 24, 2012

Connecting Remote sql server for Asp.net 2.0

Hi all,

I have an application in asp.net 2.0 and iam trying to connect database which is in remote server(Sql server 2000).But iam getting error as follows:

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 know this is because asp.net 2.0 try to connect sql serverexpress by default.i have removed sql server express from my machine,Still iam getting the same error..any body have an idea how to solve this ...

regards

anitha

Hi welcome to asp.net.

You don't have to remove sqlserver express ,it is OK to have both sqlserver 2000 and sqlserver express installed on you machine.

That error means if you are connecting to sqlserver 2005,this failure may be caused by the fact ......but you are not

First make sure your connection string is right,you can check this website:http://www.connectionstrings.com

If that is correctmake sure Named Pipes and TCP/IP network libraries are enabled for the SQL2000 instance and no firewall blocks the connection.

And you can take a look at this :http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=258082&SiteID=1

No comments:

Post a Comment