Cannot generate SSPI Context When I try to connect to a SQL Server from my local machine I get the following error:


  Cannot connect to Computer1\Instance1.
  The target principal name is incorrect.
  Cannot generate SSPI context.
  (Microsoft SQL Server, Error: 0)


When I tried to connect to the same instance through RDP, it throws the following error:


  TITLE: Microsoft SQL Server Management Studio
  Error connecting to 'Computer1\Instance1'.
  Attempted to divide by zero. (mscorlib)


At the same time it is connecting successfully through CMD. It was working fine, until last night. but now I am unable to connect to it.
I have had this happen when it loses a trust relationship with the domain. One of my solutions is to open up a command window and type in ipconfig /registerdns, wait 15 minutes and try again.