简体   繁体   中英

Login failed. The login is from an untrusted domain and cannot be used with Windows authentication on one machine only

I am using Visual Studio Community 2019 Version 16.71 over a Pulse Secure VPN. I have 3 machines I work from: 2 laptops and one deskside all running Windows 10 Version 2004. The laptops work fine but after returning from a vacation, the deskside computer started throwing the error: "Login failed. The login is from an untrusted domain and cannot be used with Windows authentication." This happens with all the apps I work on for the University and all for the initial logon portion of the app connecting to the University's SQL server.

I use runas with my University AD credentials for both VS and SSMS.

The deskside still connects to the SQL servers just fine with SSMS so it does not seem to be the VPN or a Windows issue. At first I thought it was just the current app I was working on which is quite old but it happens with every app we have on our TFS server from Windows Forms, MVC and CORE.

  1. Make sure your are using the correct username AND password when using runas.
  2. Make sure you are using /netonly in your runas command

OR

  1. If you are choosing to not use /netonly and are relying on Windows Credential Manager ensure the credentials you are relying on to connect are still valid. Perhaps your password has changed since you returned from vacation?

See answer by Mister Magoo for more information on using runas https://dba.stackexchange.com/questions/66014/connect-to-sql-server-with-windows-authentication-in-a-different-domain

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM