Supporting SQL Server 2012 AlwaysOn® in .NET Framework 4 (by Luiz Fernando Santos)
Published Mar 23 2019 12:40 PM 478 Views
First published on MSDN on Feb 17, 2012

One of the most common questions I get from customers is which version of .NET supports SQL Server 2012 AlwaysOn® connectivity.  For those who are not familiar with SQL Server 2012, this is its new and exciting high availability feature.  In a nutshell, it enhances the capabilities of Database Mirroring by providing an integrated set of options including automatic and manual failover of a group of databases and by adding support to multi-site clustering across different subnets, which enables fast cross-datacenter failover.

AlwaysOn® also enables workload-based connectivity through SQL Server Availability Groups.  In this case, applications intending to connect in order to only retrieve data can be rerouted to read-only copies of the database in another server instance, called secondary, offloading the main one, called primary.  For more information on AlwaysOn®, please refer to

From the application standpoint, AlwaysOn® does not require any special API.  The only requirement is a couple of new connection string keywords (ApplicationIntent and MultiSubnetFailover) in order to inform the application’s intent (ReadOnly or ReadWrite) and if the application is connecting to an AlwaysOn® Availability Group cluster.

More information on using these keywords can be found in MSDN, at .

On October 19 th , 2011, Microsoft released the Update 4.0.2 for the Microsoft .NET Framework 4 (found at ), which includes support for AlwaysOn® connectivity.  If you want to use this new high availability feature of SQL Server 2012, you need to apply this update in order to properly set the new connection string properties to enable direct connectivity to secondary servers and to fast failover between availability group clusters.

Now, it’s very important to have in mind that this update is not required if you plan to connect to a regular DB Mirroring infrastructure or failover cluster or even to a standalone server.

Luiz Fernando Santos


Version history
Last update:
‎Mar 23 2019 12:40 PM
Updated by: