Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Jul 30 '12 at 6:42

This question came from our site for professional and enthusiast programmers.

2 Answers 2

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.
share|improve this answer

The SQL Server events in the server's Application Event log will give you the precise cause of the failed login. On the SQL Server machine, go Administrative Tools > Event Viewer > Application and look for SQL Server events.

If you're using Trusted Connections then (unless you're using Impersonation) the identity of the IIS Application Pool is used for connections to the database. That said, I don't see the point in having SSL on a SQL Server unless it's exposed to the public web or you don't trust your LAN. It just lessens the performance of the database server, and often that's important.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.