Friday, February 24, 2012

Cannot connect to SQL Server 2005 DB from ASP.NET Configuration Tool

Hello,

I am trying to connect to a DB, which is hosted on an SQL Server 2005 by a provider, using ASP.NET Configuration Tool. The result is the following error when I click on the Security Tab:

--
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: 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)
--

The hosting provider checked that my connection string is correct. They do not know why I get the error, though. Here is a relevant snippet from my web.config:

<connectionStrings>

<removename="LocalSqlServer" />

<addname="LocalSqlServer"

connectionString="Data Source=ABC;Integrated Security=false;Initial Catalog=ABC;User ID=ABC;Password=ABC"

providerName="System.Data.SqlClient" />

</connectionStrings>

ABC is a mock :)

Could anyone pls help? It is much appreciated.

Can you ping the servername successully? Try to use IP address instead of servername as Data Source. Also make sure no firewall is blocking the TCP/IP port used by the SQL Server service (check the port in SQL Server Configuration Manager->SQL Server 2005 Network Configuration)|||

Iori_Jay:

Can you ping the servername successully? Try to use IP address instead of servername as Data Source. Also make sure no firewall is blocking the TCP/IP port used by the SQL Server service (check the port in SQL Server Configuration Manager->SQL Server 2005 Network Configuration)

I can ping the server name successfully. The VWD Express can also connect to the server just fine. So, the firewall does not block the port. But ASP.NET Configuration tool cannot connect to the server. Why? Any ideas are much appreciated.

|||

It did not help to replace the server name by IP address either...

|||

I solved the problem. The process WebDev.WebServer.exe was not allowed to access the internet by the Zone Alarm Firewall. This is a default Zone Alarm setting, which has to be changed manually.

No comments:

Post a Comment