Visual Studio 2010
Visual Studio 2010
Pro
May 05, 2010 08:03 PM
I'm using VS 2010 RTM and SQL Server 2008 on my clean development laptop, running Windows 7 Pro.
Using Visual Studio's Server Explorer, I can easily do an Add Connection by simply right-clicking, and then
completing the dialog, and choosing "Use Windows Authentication". I can then click the button "Test
Connection". This works great.
However, if I wish to do an Add Connection, and then choose "Use SQL Server Authentication", I get a
message "Login failed for user 'appSlir'", as shown here:
When I try the same thing on my other development machine, which is VS 2008, SQL Server 2008, and
Windows XP Pro, it works fine.
There seems to be a problem/bug that prevents Add Connection with "Use SQL Server Authentication" to
SQL Server 2008, when running on Windows 7 Pro.
Has anybody else encountered this? Any thoughts or ideas will be appreciated. Thanks.
Miyamoto
necro_mancer
Member
422 Points
147 Posts
o Reply
Re: Visual Studio 2010 - Add Connection / Use SQL Server Authentication - fails on Windows 7 Pro
May 06, 2010 07:57 AM
hi there,
pls try to change the Server Name to "localhost". I believe that you do not host your database elsewhere,
do you? Please try to use localhost then and see how you go
Hosted ASP.NET 4.0, WCF RIA Service, Silverlight 4 and ASP.NET MVC 3.0 Service
Professional SQL 2008 R2 Service
Miyamoto
Member
17 Points
18 Posts
o Reply
Re: Visual Studio 2010 - Add Connection / Use SQL Server Authentication - fails on Windows 7 Pro
May 06, 2010 05:48 PM
necro_mancer,
I really appreciate your help. I did as you suggested and tried Server Name of "localhost". Then I tried
Server Name of "(localhost)". The resulting error messages are shown below. Can you see any meaning
there?
Miyamoto
beharavenkat...
Contributor
2789 Points
448 Posts
o Reply
Re: Visual Studio 2010 - Add Connection / Use SQL Server Authentication - fails on Windows 7 Pro
May 06, 2010 06:03 PM
Just a query, have you checked dual mode (Windows & SQL Authentication) while installing the SQL
Server 2008. If yes then
1:Start->Programs-> SQL Server 2008-> SQL Server Configuration Tools-> MSSQLSERVER10 and click
on TCP/IP and enable it.
2: Right click on SSMS shortcut and run as Adiministrator and logon SSMS with administrator id/password,
select Security tab and click on Logons and check whether appSlir id is present.
3: start->run->services.msc and select MSSQLSERVER and check whether the service is running, if not
then start service, if service is failed then right click and select security and select logon option and enter
your windows authentication and start the service.
Miyamoto
Member
17 Points
18 Posts
o Reply
Re: Visual Studio 2010 - Add Connection / Use SQL Server Authentication - fails on Windows 7 Pro
May 07, 2010 01:15 AM
necro_mancer and beharavenkata -- Thanks for your replies and suggestions, I really appreciate it. I tried
it all.
The solution turned out to be surprisingly simple: I had to configure the server for Mixed Mode
Authentication, as follows:
First, in order to use Mixed Mode Authentication for SQL Server 2008, it's required that your passwords,
including sa, must all be "strong", meaning at least 8 chars, and have upper/lower case, numbers, and
special chars, as defined here:
http://technet.microsoft.com/en-us/library/cc281849.aspx
But the real trick is, instead of using Sql Server Configuration Manager, just use SQL Server Management
Studio 2008. There, in the upper left panel, right-click on the server, then choose Properties. Then, in the
left panel, choose Security. Then, in the Server Properties dialog, choose the radio button "SQL Server
and Windows Authentication mode". Then click OK, then do a restart.
Then everything started working for me.
In VS 2010 I can now successfully use the Server Explorer to easily add a new connection using SQL
Server Authentication.
Miyamoto
necro_mancer
Member
422 Points
147 Posts
o Reply
Re: Visual Studio 2010 - Add Connection / Use SQL Server Authentication - fails on Windows 7 Pro
May 07, 2010 02:24 AM
hi miyamoto,
that is SUPERB. It is good to know that you can resolve the problem :-)
Hosted ASP.NET 4.0, WCF RIA Service, Silverlight 4 and ASP.NET MVC 3.0 Service
Professional SQL 2008 R2 Service