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
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.