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

Raghava Sai Akula 361 Reputation points
2023-04-04T13:29:01.1666667+00:00

Hi , I am having an legacy vb.net 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,585 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alberto Morillo 33,426 Reputation points MVP
    2023-04-04T15:05:47.5066667+00:00

    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.