When publishing, unable to load dll 'sni.dll"


When I run my application via ISS Express, everything is okay. When I publish it and try to log in, the following error occurs:

Unable to load DLL 'sni.dll' or one of its dependencies: Access is denied. (0x80070005 (E_ACCESSDENIED))

I have tried to install the NuGet package sqlclient. Both, System and after that Microsoft. Still the same error.

I'm using .NET v3 and this is my connectionstring:

 "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=StocksDB;Trusted_Connection=True;MultipleActiveResultSets=true"

Please let me know if you have an idea of how to solve it.

asked on Stack Overflow May 26, 2021 by JaDa-ma • edited May 27, 2021 by Jack J Jun - MSFT

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0