Cannot create SSPI context

前端 未结 19 1352
北海茫月
北海茫月 2020-12-28 13:13

I am working on a .NET application where I am trying to build the database scripts. While building the project, I am getting an error \"Cannot create SSPI context.\". This e

相关标签:
19条回答
  • 2020-12-28 13:40

    First thing you should do is go into the logs (Management\SQL Server Logs) and see if SQL Server successfully registered the Service Principal Name (SPN). If you see some sort of error (The SQL Server Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service) then you know where to start.

    We saw this happen when we changed the account SQL Server was running under. Resetting it to Local System Account solved the problem. Microsoft also has a guide on manually configuring the SPN.

    0 讨论(0)
  • 2020-12-28 13:43

    The "Cannot Generate SSPI Context" error is very generic and can happen for a multitude of reasons. Is just a cover error for any underlying Kerberos/NTLM error. Gbn's KB article link is a very good starting point and usualy solves the issues. If you still have problems I recommend following the troubleshooting steps in Troubleshooting Kerberos Errors.

    0 讨论(0)
  • 2020-12-28 13:43

    I can able to get this resolved by resetting the domain (server machine, which is the domain server, but not related to SQL Server except domain managing) followed by the client machines.

    Thank you all for your immediate support!

    0 讨论(0)
  • 2020-12-28 13:46

    I had this error- it happened because my password expired and I had to change it. I didn't notice it, because in some programs I could still log in and everything would work normally (including windows), but I couldn't log to any sql servers.

    0 讨论(0)
  • 2020-12-28 13:47

    I just had the same problem and all I did was delete the user log in credentials in sql server using another user id and adding them back.

    0 讨论(0)
  • 2020-12-28 13:47

    In case you are running a code not written in your computer, that runs in a computer used by your work peer, but not in yours, check the web.config. Maybe there is your colleague's name as userPrincipalName at some place that should be in blank. That happens automatically when we create a service reference to the project in VS.

    0 讨论(0)
提交回复
热议问题