Windows – what would need to change on IIS for SSL Enabled SQL server

iissqlsslwindows

I have IIS set with windows intergrated security, the intranet c# web application connects database with trust connection.
Everything works fine until we enabled SSL on the database (Sql server 2008), now we have the following error Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. I tried to change the SQL server connection string, but it won't work. Any suggestions?

Best Answer

Have you installed the certificate on the client computers. SSL with SQL Server requires that the certificate be installed onto the server, SQL Server configured to use it, and then the certificate's public key has to be exported and installed on the clients so that they can communicate.

From 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.