开发者

Kerberos, Claims Based authentication and Sharepoint : Cannot connect to database

I have a server which hosts Sharepoint 2010. I have another server which hosts a SQL Server 2008 R2. SharePoint is Kerberos/C开发者_StackOverflow中文版laims Based.

On my SharePoint, I installed a custom made webpart that connects to the SQL Server machine using standard connection string (Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;).

The problem is that when the webpart tries to connect to the sql server, I get the following message :

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

What we've done :

  • Verify all spn/delegation/trusts things - everything seems okay.
  • Tried to connect directly from the sharepoint machine via a UDL file to sql server, and it works.
  • Tried the webpart as standalone ASPX page on a single machine server to prove the code is supposed to work, and it works.
  • Wireshark -> We can see a KDC_ERR_S_PRINCIPAL_UNKNOWN when ANONYMUS LOGON tries to connect to sql server (obvisously).
  • SharePoint Developer Dashboard shows us our current username, which is not ANONYMUS.
  • Traces in the webpart shows two things : The HTTPCONTEXT is set to my current user, so is the Thread.Current.
  • Using SQL Profiler, we can see that the request is from ANONYMUS
  • We tried to access a web service on another server from another custom made webpart, and it failed for the same reason (ANONYMUS).

What are we missing? The problem really seems to be that SharePoint is unable to send the current user credential to another server (sql or not).


Have you verified that Kerberos is working ?

Download the Troubleshooting Kerberos Delegation

http://www.microsoft.com/DOWNLOADS/details.aspx?familyid=99B0F94F-E28A-4726-BFFE-2F64AE2F59A2&displaylang=en

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜