7

Our admin set up a brand new Windows 2012 R2 server with Visual Studio 2015. When I try to connect to an existing sql server 2008 database (running on a windows 2008 r2 server) from Visual Studio, using Tools -> Connect to database..., I can enter all the information, the dialog retrieves the list of databases, Test Connection works, but when I click ok I get:

The computer must be trusted for delegation and the current user account must be configured to allow delegation

Both servers are under the same domain (development) and I am local admin on both of them. My account though is on a different domain that has access to the development domain.

Any ideas on how to fix this? Are they referring to the windows 2012 server or the database server in the message?

Just as a side note, I can connect successfully from another windows 2008 r2 server using the same windows account.

Update: the connection that fails uses windows authentication.

  • If you are using Windows authentication, this is possibly an issue with SPN and Kerberos. If you're using SQL authentication, then I'm at a loss. – Randolph West Jul 7 '17 at 23:50
  • Yes, I am using windows authentication. SQL authentication works fine. – costa Jul 8 '17 at 0:18
  • Give this a look. Definitely Kerberos issue, which means you need to either run SetSPN, or modify the AD to give SPN permissions to the account that's running the SQL service. technet.microsoft.com/en-us/library/bb735885.aspx – Randolph West Jul 8 '17 at 0:20
  • @RandolphWest: are you saying that VS 2015 running on Windows 2012 R2 uses Kerberos when I use windows authentication to connect to sql server 2008 (running on windows 2008 R2) instead of NTLM? – costa Jul 10 '17 at 22:09
  • @RandolphWest: What's weird is that I can see the databases, Test Connection is successful but then when I click ok it fails with the message above. – costa Jul 10 '17 at 22:10
7

According to KB3000850, this affects domain-joined Windows 8.1 computers after installing security update 2992611 or update 3000850.

I added the following value under:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Protect\Providers\df9d8cd0-1501-11d1-8c7a-00c04fc297eb

ProtectionPolicy = 1 (DWORD)

Now I can connect.

I found some other postings about this:

https://blog.sqlauthority.com/2017/04/01/sql-server-system-security-cryptography-cryptographicexception-error-generating-xml-document/

https://social.technet.microsoft.com/Forums/windows/en-US/47faab6b-d717-4068-bee4-c694811e0066/credential-manager-problems-error-0x80090345?forum=w8itpronetworking

  • It appears to have something to do with Read-Only Domain Controllers, according to Pinal's post. Fascinating. Thanks for this find. – Randolph West Jul 14 '17 at 17:57
  • I also had this problem using a Synology DS1813+ as a domain controller, and adding this registry key to my PC fixed it. Thanks! – Chris R. Donnelly May 9 '18 at 3:33
  • This can also be a Windows 10 issue. Adding this registry key fixed it, though! – Kelly Aug 3 '18 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.