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

dvplayltd
dvplayltd used Ask the Experts™
on
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=127.0.0.1,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 ?
Comment
Watch Question

Do more with

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

Commented:
Hi.
Under what account the application pool is started?

Author

Commented:
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 ?
Hi

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

Author

Commented:
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 - 127.0.0.1 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 127.0.0.1 as this Minchev\SQL2005 is diffrerent for different computers on which I and my helper work.
Hi
In order to connect to SQL SERVER only with 127.0.0.1 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    0.0.0.0:1433           0.0.0.0:0              LISTENING

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

Good luck!
Guy H

Author

Commented:
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