Authentication of a SQL connection using certificates in .NET.

I noticed that SQL Server 2005/2008 can authenticate replication accounts using certificates. Is it possible to authenticate .NET SqlConnection in the same estate?

Ideally, I would like to completely remove password authentication and connect to the aspnet user using the certificate stored in his account.

Is this possible, and if so, how can this be done?

+7
sql-server
source share
2 answers

The only way to authenticate a TDS protocol connection (that is, a user connection) is through Windows authentication (NTLM / Kerberos) or SQL authentication (user / password). Unable to authenticate TDS connections using certificates. Only database mirroring connections and service brokers can authenticate with a certificate .

What you probably noticed is HTTPS authentication between IIS and the client, which is found in replication on the website . This is indeed certificate-based authentication, but between the client and IIS and SQL Server it is not connected in any way.

+4
source share

You can configure ASP.NET to use client-side certificates, see this article in KB .

But the ASP.NET server does not have access to your client certificate. Therefore, ASP.NET cannot authenticate to SQL Server with a certificate.

-one
source share

All Articles