Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 MS SQ Server: untrusted domain, but same computer

Author  Topic 

bpn
Starting Member

4 Posts

Posted - 2013-05-22 : 16:43:21
Hi,

on my laptop i installed MS SQL Server 2008 Express.

configuration is: windows authentication. (need more info?)

i've written a vb.net application that opens a database on the server with the following connection string:

Driver=SQL Server Native Client 10.0;Server=192.168.178.20,1433;Network=dbmssocn;Database=DB1;MARS_Connection=yes;Trusted_Connection=Yes

I get the following error:

"Login failed. The login is from an untrusted domain and cannot be used with Windows authentication."

Everything ist local on one single machine (Windows Vista).

It only works if i change the IP address to 127.0.0.1.

How can i make it run with the regular IP address?

Any help appreciated.

Regards

bpn

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-05-23 : 00:48:26
whats the login context under which application runs? Is it connecting to database using same windows credentials you use otherwise?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

bpn
Starting Member

4 Posts

Posted - 2013-05-23 : 01:24:20
Yes.
And also:
I get the same error connecting to the db via sqlcmd.
Still all locally.
Go to Top of Page

bpn
Starting Member

4 Posts

Posted - 2013-05-23 : 03:29:23
Please let me summarize the problem more accurately (hopefully):

Windows:
- One single machine Windows Vista
- Windows user is "admin" (it is local administrator)
- Machine has an IP-address of 192.168.178.20 (obtained from my WLAN router via DHCP)

SQL Server:
- SQL Server 2008 is installed
- SQLEXPRESS runs under my admin user
- configured: "Windows Authentication"
- IP-addresses: 192.168.178.20 is activated and active (port 1433)

What happened:
- Logged on to the machine using admin
- started sqlcmd using following command (test.sql contains some sql):
sqlcmd -S 192.168.178.20 -E -i test.sql
-> Error: "Login failed. The login is from an untrusted domain and cannot be used with Windows authentication."


instead:
sqlcmd -S 127.0.0.1 -E -i test.sql
-> no error. SQL delivers results.

What to do?

Regards
bpn
Go to Top of Page

bpn
Starting Member

4 Posts

Posted - 2013-05-23 : 16:21:49
Problem solved:

In the server log i found an SSPI handshake failure so i could google much better. That brought me to

http://voices.yahoo.com/techtips-fix-error-sspi-handshake-failed-6663816.html

which basically said:

Regedit:
In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
create new DWORD-Attribute named DisableLoopbackCheck
value 1
Reboot Server

Refer to the site for further explanations.

Everything fine now!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-05-24 : 00:30:30
Thanks for posting the final solution. This will surely benefit others.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -