Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 Jul 30 '12 at 6:42

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

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

Copy either the original certificate or the exported certificate file to the client computer.

On the client computer, use the Certificates snap-in to install either the root certificate or the exported certificate file.

In the console pane, right-click SQL Server Native Client Configuration, and then click Properties.

On the Flags page, in the Force protocol encryption box, click Yes.

To encrypt a connection from SQL Server Management Studio

On the Object Explorer toolbar, click Connect, and then click Database Engine.

In the Connect to Server dialog box, complete the connection information, and then click Options.

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


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