在启用了SSL的SQL服务器的IIS上需要更改什么

我有IIS与Windows集成安全设置,Intranet C#Web应用程序连接数据库与信任连接。 一切正常,直到我们在数据库(Sql Server 2008)上启用SSL,现在我们有以下错误Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' 。 我试图改变SQL服务器连接string,但它不会工作。 有什么build议么?

您是否在客户端计算机上安装了证书? 使用SQL Server的SSL要求将证书安装到服务器上,SQL Serverconfiguration为使用它,然后必须将证书的公钥导出并安装在客户端上,以便它们可以通信。

来自MSDN :

 To configure the client to request encrypted connections 1. Copy either the original certificate or the exported certificate file to the client computer. 2. On the client computer, use the Certificates snap-in to install either the root certificate or the exported certificate file. 3. In the console pane, right-click SQL Server Native Client Configuration, and then click Properties. 4. On the Flags page, in the Force protocol encryption box, click Yes. To encrypt a connection from SQL Server Management Studio 1. On the Object Explorer toolbar, click Connect, and then click Database Engine. 2. In the Connect to Server dialog box, complete the connection information, and then click Options. 3. On the Connection Properties tab, click Encrypt connection. 

服务器的“应用程序事件”日志中的SQL Server事件将为您提供login失败的确切原因。 在SQL Server计算机上,转至“pipe理工具”>“事件查看器”>“应用程序”,然后查找SQL Server事件。

如果您使用的是受信任的连接,那么(除非使用模拟),IIS应用程序池的标识将用于连接到数据库。 也就是说,我没有看到在SQL Server上使用SSL,除非它暴露在公共网上,或者你不信任你的局域网。 这只会降低数据库服务器的性能,而且这通常很重要。