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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 MS SQ Server: untrusted domain, but same computer
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bpn
Starting Member

4 Posts

Posted - 05/22/2013 :  16:43:21  Show Profile  Reply with Quote
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

India
52326 Posts

Posted - 05/23/2013 :  00:48:26  Show Profile  Reply with Quote
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 - 05/23/2013 :  01:24:20  Show Profile  Reply with Quote
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 - 05/23/2013 :  03:29:23  Show Profile  Reply with Quote
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 - 05/23/2013 :  16:21:49  Show Profile  Reply with Quote
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

India
52326 Posts

Posted - 05/24/2013 :  00:30:30  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000