Error : Unable to load DLL 'Microsoft.Data.SqlClient.SNI.x64.dll'

Raghava Sai Akula 351 Reputation points

Hi , I am having an legacy application which is using .net 4.7.2.

I replaced System.Data.Sqlclient with Microsoft.Data.Sqlclient(v 2.1.5) to make my application connectionstrig(password less). I made the Microsoft.Data.Sqlclient changes in dev env and the application is loading perfectly in my localhost but in test env it throws error. Screenshot when browsed locally with in IIS of my VM User's image

Note : My Env is completely Azure (Azure Sql, Application in IIS in a Azure VM) and I don't have any SSMS or Sqlserver on my Azure VM. My Application is working fine in my Local Dev Env

Azure SQL Database
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,283 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alberto Morillo 32,996 Reputation points MVP

    Have you tried to install the driver from here? Finally this seems to be a bug with .Net Framework 4.7.2 as demonstrated here.