Logging in throws an error that generally says "ACCESSDENIED" from the sql client. On the production environment, this page throws this error when entering the login credentials regardless of whether the credentials is the correct one or not. However, in the development environment on the localhost, it works fine, i.e login is successful upon entering the correct credentials and fails upon entering incorrect credentials.
This is for ASP.NET Maker 2021 version.
Please any suggestions as to what is causing this error and how can it be fixed?
Below is the actual error page that is thrown when trying to login.
"""
An unhandled exception occurred while processing the request.
DllNotFoundException: Unable to load DLL 'Microsoft.Data.SqlClient.SNI.dll' or one of its dependencies: Access is denied. (0x80070005 (E_ACCESSDENIED))
Microsoft.Data.SqlClient.SNINativeMethodWrapper.SNIInitialize(IntPtr pmo)
TypeInitializationException: The type initializer for 'Microsoft.Data.SqlClient.SNILoadHandle' threw an exception.
Microsoft.Data.SqlClient.TdsParserStateObjectFactory.get_EncryptionOptions()
TypeInitializationException: The type initializer for 'Microsoft.Data.SqlClient.TdsParser' threw an exception.
Microsoft.Data.SqlClient.TdsParser..ctor(bool MARS, bool fAsynchronous)
"""
STACK TRACE
"""
DllNotFoundException: Unable to load DLL 'Microsoft.Data.SqlClient.SNI.dll' or one of its dependencies: Access is denied. (0x80070005 (E_ACCESSDENIED))
Microsoft.Data.SqlClient.SNINativeMethodWrapper.SNIInitialize(IntPtr pmo)
Microsoft.Data.SqlClient.SNINativeMethodWrapper.SNIInitialize()
Microsoft.Data.SqlClient.SNILoadHandle..ctor()
Microsoft.Data.SqlClient.SNILoadHandle..cctor()
"""