all groups > visual studio .net general > february 2006 >
You're in the

visual studio .net general

group:

Unable to connect to SQL Server database.


Unable to connect to SQL Server database. Garry G Bain
2/27/2006 6:44:45 AM
visual studio .net general:
VS2005 just created a Web Solution using WebParts.

When I click the Security Tab or link in the WAT (Web site Admin Tool) I get
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.

I click the button, test the connection and get another 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 following message may help in diagnosing the problem: Unable to connect
to SQL Server database. "

I actioned the above and also enabled roles and all sorts I've also found in
MSDN a fix which was to amend the LocalsqlServer property in the
machine.config file.

None of this has helped.

Can any one please help.

Spend loads of money on VS loads of time and ended up with an uphappy FD and
Re: Unable to connect to SQL Server database. Brooke
2/27/2006 12:25:09 PM
I have been using SQL Server and VS2005 with no problems. Just need to make
sure that he connection string to the server is correct.

Have you tried connecting through Server Explorer in VS2005? I usually
verify the connection using VS2005 and Server Explorer, and then I copy the
connection string to the web.config.

Your connection string will be different on the web server than it is on
your local workstation. I usually modify the web.config in the publish
directory before copying to the web server.



[quoted text, click to view]

Re: Unable to connect to SQL Server database. Garry G Bain
2/28/2006 3:31:29 AM
I've just noticed that there's no database in the app_data folder, so I can'
create a connection ?
--
Garry G Bain


[quoted text, click to view]
RE: Unable to connect to SQL Server database. Bin
4/2/2006 6:52:02 PM
I got same problem before.
AddThis Social Bookmark Button