Friday, November 02, 2007 9:14 PM
I am having problems connecting to the database. I am trying to use Membership API and for some reason it will no longer connect to the database. I previously had Visual Studio 2005 Standard Edition and it worked just fine, until I tried to install MS SQL Express. I have tried the aspnet_regsql and sqlcmd InstallCommon.sql and both times I received a named pipe error. I look at the configuration and it said named pipes enabled.
I eventually gave up after trying for two days and removed MS SQL Express, but now I am still getting the same error. I tried to uninstall all of the SQL editions and reinstall the MSDE that comes with VS 2005, but I am getting the same error.
When checking the ASP.NET Web Application and testing the provider I receive the following error:
Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.
The security tab gives you the following error:
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: Unable to connect to SQL Server database.
Running the sqlcmd in the command prompt I receive the following error:
Sqlcmd: Error: Connection failure. SQL Native Client is not installed correctly. To correct this, run SQL Server Setup.
I just Visual Studio to work correctly again.
Saturday, November 03, 2007 1:35 AMModerator
looks like connectivity issue.. Check these steps
(a) Check whether the server is configured to accept remote connections. Use SAC to enable server for remote connection
(b) Ensure that the SQL Browser service is started (SQL Browser is the upgrade to the SQL Server Resolution Protocol (SSRP) )
(c) Determine whether clients are specifying the correct port (for using fixed ports with named instances) in the server alias or connection string.
(d) Check whether the client’s network protocols are enabled and configured to correctly handshake with those of the server.
(e) Be sure you have permission to connect on the server’s endpoints.
(f) When using encryption, be sure the server and client certificates match (that is, check their Common Name (CN) and any other relevant attributes) and are installed and configured correctly on both sides.
(g) Make certain that your firewalls are configured to permit the required network traffic.
(h) Check to see whether your users have permission to log in to the server and access the specified database.
(i) Make sure the provider, driver, DSN, server alias, or other connection mechanism is still valid and hasn’t been altered or removed from the system.
(j) Create Firewall Exception
Refer following KBs and Blogs for more info :-