Tuesday, March 27, 2012

Connecting to SQL Server 2005

I installed the SQL Server 2005 Trial and am now having trouble connecting. When I bring up the ASP.NET Configuration tool and Go to "Provider configuration" "Select a single provider for all site management data" AspNetSqlProvider Test I get the following message.

"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. "

I have already run the aspnet_regsql command-line utility.

Can anybody give me some information on how to set this up.

I am currently working with the club web site starter kit.

I first recommend you go grab this awesome management tool for the express edts :

http://www.microsoft.com/downloads/details.aspx?familyid=82afbd59-57a4-455e-a2d6-1d4c98d40f6e&displaylang=en

I would then first check to see if your connections to the DB work with this tool and copy the connection strings it gives you and use them in your app. Also, you can configure ASPNETDB from the web.config level and dont have to use the web tool. This way you can test directoly to ASPNETDB. I havent used the club starter kit but im sure it either uses app_data or aspnetdb in the db. All you have to do is point to the right one. I wrote a couple blogs on this :

http://eramseur.blogspot.com/2005/12/aspnet-20-create-custom-provider-for_10.html

I would also check out scotts entry :
http://weblogs.asp.net/scottgu/archive/2006/02/24/438953.aspx

He has another article about how to get membershp up in 15 minutes and you should look at that too.

No comments:

Post a Comment