user1085907
user1085907

Reputation: 1035

Cannot generate SSPI context

After waking up computer from hibernation or connection to VPN I cant login to my localhost MSSQLServer

Following error in management studio:

Cannot connect to localhost.

===================================

The target principal name is incorrect.  Cannot generate SSPI context. (.Net SqlClient Data Provider)

Winver: 1909 Pro

SqlServer: 15.0.2070.41

Domain: no

Same machine: yes

MSSQLServer running under NT Service\MSSQLSERVER

Named Pipes Enabled

TCP/IP Enabled

Authentication: Mixed (Management studio login as Windows Auth)

SQL Server Browser + SQL Server Agent are running

Its freshly installed since November. Issues began at November also. I just run out of ideas what can be wrong. I read few articles but they didnt work or didnt run on same machine like I do

EDIT: Kerberos output: log

18/02/2020 12:27:24 Info: Connect to WMI, \root\cimv2
18/02/2020 12:27:50 Error: Access of User Principal information failed System.DirectoryServices.AccountManagement.PrincipalServerDownException: The server could not be contacted. ---> System.DirectoryServices.Protocols.LdapException: The LDAP server is unavailable.
   at System.DirectoryServices.Protocols.LdapConnection.Connect()
   at System.DirectoryServices.Protocols.LdapConnection.SendRequestHelper(DirectoryRequest request, Int32& messageID)
   at System.DirectoryServices.Protocols.LdapConnection.SendRequest(DirectoryRequest request, TimeSpan requestTimeout)
   at System.DirectoryServices.AccountManagement.PrincipalContext.ReadServerConfig(String serverName, ServerProperties& properties)
   --- End of inner exception stack trace ---
   at System.DirectoryServices.AccountManagement.PrincipalContext.ReadServerConfig(String serverName, ServerProperties& properties)
   at System.DirectoryServices.AccountManagement.PrincipalContext.DoServerVerifyAndPropRetrieval()
   at System.DirectoryServices.AccountManagement.PrincipalContext..ctor(ContextType contextType, String name, String container, ContextOptions options, String userName, String password)
   at System.DirectoryServices.AccountManagement.PrincipalContext..ctor(ContextType contextType, String name)
   at KerberosCM.WMIHelper.TryGetUser(SystemInfo mi, UserPrincipal& user)

Upvotes: -1

Views: 11223

Answers (1)

wizwind
wizwind

Reputation: 27

Go to application pool at IIS Server and then to the advanced settings make sure the identity account which is set is correct.Also check the account that you have set at IIS, right click the website then go to manage website and then manage website and advanced settings.

Upvotes: 0

Related Questions