Under Windows Vista, if you use ASP.net Configuration tool of VWD and test AspNetSqlProvider connection, you will get a error message saying:
"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"
You can following things to solve it:
1. CLOSE Vista's User Account Control function! I googled and tried some solutions introduced on the Internet. However, I couldn't slove the problem. Through many tests, I finally realised the permission issue of Windows Vista itself. After shooting down the UAC, The problem solved. UAC is good for keeping windows safe, but I have to close it as I can not find anywhere to configure it specifically. My suggestion is that before you do anything, close UAC and see if the problem solved.
2. Use aspnet_regsql.exe under .\windows\Microsoft.NET\Framework\v2.xx(the version of your .net framework installed), to create aspnetdb database. This tool will provide a GUI wizard, please make sure the server name is right. If you use SQL 2005 Express, the name is likely to be <your computer name>\sqlexpress
3. Use SQL server configuration manager to enable SQL Server Browser services, and to enable TCP/IP, Name Pipes, VIA
4. Run MS SQL Server Management Studio Express. In sqlquery run "sp_configure" to check if the value of "user instances enabled" is 1. If not, run sp_configure "user instances enabled",1 and reconfigure to set the value to 1.
5. Make sure your SQL installed fine. When you install the SQL 2005 Express on a vista ultimate pc, it may promote that IIS is not installed or enabled. The reason is that some components of IIS on which SQL depends. Detailed solution: http://support.microsoft.com/?scid=kb%3Ben-us%3B920201&x=23&y=18