How to make trusted connection via Windows 7 and SQL Server ?

dvplayltd used Ask the Experts™
Hi experts!

I’m developing application WinForm on NETFramework 2 with C# and I use trusted connection to connect to SQL Server 2005 locally. Till now, I’m using WInXp and Windows 2008 server and it work OK. But after I change my OS to Win 7 on my developer computer whit same this connection string
"Data Source=,4996;Initial Catalog=VP_VideoPlayerEU;Integrated Security=SSPI;Persist Security Info=True;MultipleActiveResultSets=True;Connection Timeout=5;Application Name=Reg Ads Cust;"

I gete error:

Login failed for user ''. The user is not associated with a trusted SQL Server connection.

It is clear that is somethink with SQL server, but what ? It is in mixed mode, Admin account is computer administartors, I give permmison of BultIn\Adminstrators to my databsese, but not help.  I use this connection string in many many computers. But now, under Win 7 somethink is changed, what I suould do ?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Alexey KomarovChief Project Engineer

Under what account the application pool is started?


To alexeykomarov

You ask is for account under which is started service? It is Local System Account and is allowed to interact with dectop.

To rajvja - link is not correct. May be type error ?

1. I see that the applicaiton and the DB are both on the same machin right?
2. please make sure windoes login exists in the SQL SERVER for the DOMAIN/lusername
3. please make sure that the application is running with the  DOMAIN/lusername

Good luck!!
Guy H


To GuyHochman

Yes, I do all of this! I was do it 2 years with no any problem, now go to Win 7 and somethink is change :-(

Hyyym. I find what is change - do not work like local computer and trusted connection. I change it to Minchev\SQL2005 (my SQL server instanse) and now work. But I prefer to use as this Minchev\SQL2005 is diffrerent for different computers on which I and my helper work.
In order to connect to SQL SERVER only with you the SQL need to listen in port  1433
Did you set the SQL SERVER to listen in port 1433?

please make sure by running;
start -> run-> cmd
netstat -na |find /I "list"
Do you see this line?
TCP               LISTENING

tell me if not and i will tel you how to configure it.

Good luck!
Guy H


10x. Thanks.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial