Cannot generate SSPI context

During our project we ran into the "Cannot generate SSPI context" error message. We were using a WCF service to retreive information from SQL. It took quite a while to figure out where it came from as we were not using Kerberos (which is usually the case when this error pops up, see https://support.microsoft.com/kb/811889 ). In the end we figured out that the credentials of the application pool account running the service were messed up. Root cause was not found for that particular case, but it ended up in the service failing the moment the application pool was reset. At that time the error message was nice and clear (bad username/password) Putting in the correct credentials did fix the issue, even though the credentials of that account were not changed at all.

So if you get this one, and you are in this particulal case, just restart your application pool account to either identify if this is the cause of your problems, or if you need to look further.