Cannot create SSPI context

前端 未结 19 1543
北海茫月
北海茫月 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:55

    Here is my case. I had a remote machine that hosted SQL Server. From my local machine, I was trying to access the SQL instance via some C# code and I was getting this error. My password for the user account on my machine/domain had expired. I fixed it with the following:

    1. Opened the remote machine, which prompted me for a password change
    2. I changed my password within this prompt and logged into the remote machine
    3. I "locked" my local machine (using windows + L key so I didn't have to completely sign off) so that I could get back to the sign-on page
    4. I signed back onto my local machine with the new password

    Everything then worked fine.

提交回复
热议问题