Forum / Remote Desktop Manager - Support

Installed Visual Studio 2019 and now RDM won't connect to Azure SQL data source

  • Create an Issue
  • Cancel

I just installed Visual Studio 2019 and now on my computer I get the "Unable to load adalsql.dll error message on launch of RDM".

Of course, I had been using RDM successfully with my Azure SQL Data Source for some time and had downloaded and installed adalsql.dll a long time ago.

When I try to reinstall the version of adalsql.dll that RDM recommends, I get a message that there is a newer version already on my PC.

In Programs and Features, there is not a seperate line iteam for adalsql anymore. I assume it gets installed with the the Microsoft Azure Libraries for .NET - v2.9 (which actually shows as 3.0.0127.060 in the Version column).

Will RDM support the latest version of adalsql soon? I need RDM and VS 2019 both on my PC.

Clock9 mths

A little more info -

I ended up uninstalling Visual Studio 2019, and then was able to reinstall Active Directory Authentication Library for SQL Server from the download link RDM provides.

So, it looks like VS 2019 installs a newer version of adalsql.dll that RDM is not compatible with. I could never locate adalsql.dll anywhere on my Windows 10 machine, so I am not sure where VS 2019 installs it. But, it was most certainly there because I could not install the compatible version of it due to the installer recognizing that a newer version existed on my machine.

Look forward to hearing from Devolutions as to when RDM will be compatible with the version of adalsql that VS 2019 installs.

Clock9 mths

Very interesting issue.

This is not the first time an update to adalsql.dll caused us issues. I will first need to reproduce the issue, should be easy, then try a few tricks to resolve it.

I will get back to you once I figure something out.

Best regards,

Stefane Lavergne

signaturesignature

Clock9 mths

Can you please send me your application logs? Help -> Application Log -> under the Report section -> click Send to support

Over the weekend I installed VS2019 on my home PC and I wasn't able to reproduce the behavior. My hope is the application logs will help us understand the issue allowing us to reproduce and resolve it.

Best regards,

Stefane Lavergne

signaturesignature

Clock9 mths

Yes, I just sent them, Stefane.

I ended up uninstalling VS 2019 on this laptop and installed it on a VM that I can remote into, in order to workaround the problem and keep moving. So, I can't really re-test easily for you if you find a problem and come up with a solution. But, maybe you won't be able to replicate it and it will turn out that it was just a configuration problem with my particular laptop.

Thanks for looking into it so quickly!

Jeff

Clock9 mths

Jeff,

Thank you for the logs. Unfortunately, the last crash in the logged dates back to 02/25/2019 so it is not related to your issue.

I will keep an eye open to see if anyone else reports the error. On your side, if you happen to reinstall VS2019 on your laptop and the issue resurfaces, then go to File > Options > Advanced > Debug Level > set it to 1. Now try connecting again, this will generate the missing logs that should allow us to diagnose the issue and gain further insight. Send us the logs and post back on this thread.

Best regards,

Stefane Lavergne

signaturesignature

Clock9 mths

My collegue has the same issue.... RDM doens't work for him anymore:
System.Data.SqlClient.SqlException (0x80131904): Unable to load adalsql.dll (Authentication=ActiveDirectoryPassword). Error code: 0x2. For more information, see http://go.microsoft.com/fwlink/?LinkID=513072
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Devolutions.RemoteDesktopManager.Business.DataSources.SQLServerConnectionDataSource.cb237041e20b5e69dd4663ff2ed975633(String c18973cea236a9feff75c32ca7d1697d5, String c5b591b7955deb9ddac9f502d298faf48, String ceb81d1ee93f91e0bc57f34876c263863)
ClientConnectionId:486a2e28-8009-49b7-a083-93bc88b69539

The error does NOT appear in the application logs.

Clock8 mths

@sander01,

What version of ADALSQL.DLL is installed on his computer?

I would recommend installing the version below
https://www.microsoft.com/en-us/download/details.aspx?id=48742

Best regards,



Jeff Dagenais

signaturesignature

Clock8 mths

Jean-Francois Dagenais wrote:

@sander01,

What version of ADALSQL.DLL is installed on his computer?

I would recommend installing the version below
https://www.microsoft.com/en-us/download/details.aspx?id=48742

Best regards,

It says:

Installation of Active Directory Authentication Library' for SQL Server failed because 
a higher version already exists on the machine. To proceed, uninstall the higher
version and then run Active Directory Authentication Library' for SQL Server Setup
again.

Not a clue which version is installed - does not appear in installed program seperatly.

Is it possible for you to test this (install VS2019). It wont be long for VS2019 launches and a lot of devs will have issue's with RDM i guess...
Note that in the past we also had loads of issue's with ADAL after installing SQL mgmt studio.

Clock8 mths

I installed VS2019 today and fixed the issue.

After installing VS 2019 it installed version=16.0.61903.25110. The MSI could be found in :

C:\ProgramData\Microsoft\VisualStudio\Packages\sql_adalsql,version=16.0.61903.25110,chip=x64,language=en-US

Which I used to uninstall. Afterwards installed the right version .
Note VS also has package "sql_adalsql,version=15.1.61810.11040,chip=x64,language=en-US" in the same "Packages" folder.


BTW: how do you guys reference / use ADAL? Do you use the nuget package https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory ?

Clock8 mths

Hello,

I had a chat with our engineering department and they will try to update our DLL in RDM to see if it helps.
We had a lot of issues with this DLL in the past. We will try to do something regarding this.

Thank you for your feedback.

Best regards,



Jeff Dagenais

signaturesignature

Clock8 mths

Our dev team is getting quite fed up with these issue's. Vs update about every week ; meaning the procedure tot uninstall - install had to ben done quite a lot.

Clock5 mths

We understand your frustration. We will look at updating the .dll reference.

Please keep in mind we also have to be mindful of others that aren't on the latest releases of VS (Visual Studio) or SSMS (SQL Server Management Studio) for example and by updating the .dll we force everyone to now install the latest version of the sql_adal. It's a complicated thing to handle when you consider that the .dll in question has seen 5 (9 if you count preview) releases in the last 6 months (18 in 18 months). Keeping up to date on the latest version isn't always feasible.

Best regards,

Stefane Lavergne

signaturesignature

Clock5 mths

I assume it is possible to support multiple versions ; meaning when a new version is out you just need to add support for the new version. I also don't understand why these adal versions just are not backwards compatible. Meaning why cant i use the latest and greatest version while RDM workt with a slightly older version... Really dont get it why this software has such a hard dependency on the adal version.

I mean my old SSMS versions dont stop working when i install latest VS version and or other SMSS version side-by-side.
But i'll stop wanking about it - just wanted to let you know this is really annoying. Please think about solving this the good way wink

Clock4 mths

Hello Sander,

Thank you for your comment. We understand the frustration that it could cause. Stefane is on vacation, but I will send him your comments.

In the meantime, if there is anything else we can help you with, please let us know.

Best regards,



David Grandolfo

signaturesignature

Clock4 mths

Hello,

In the latest Beta of RDM 2019.2.6 we integrate the NuGet package. If you can test it and tell us if it works well for you, it will be appreciate.

You can download it from https://remotedesktopmanager.com/Home/Download#Beta

Best regards,



David Grandolfo

signaturesignature

Clock3 mths

Thanks David. I tried the beta; but this required a DB-update which i probably best not perform since other colleagues use the same datasource. I cannot force them to use the beta - and cannot risk to break there version of RdM.

Unless you can tell me the db-changes are backward compatible with the current RdM client?

Clock2 mths

Which version your colleague is currently using? Also, what is the data source (SQL, SQL Azure, DPS,...)?

Best regards,



David Grandolfo

signaturesignature

Clock2 mths

At the moment we are all using version 1.41.0 (latest release version) combined with Azure SQL data source.

Clock2 mths

The beta version (2019.2.x) is compatible with 2019.1.41.0. However, we always recommend doing a backup before upgrading a database.

Best regards,



David Grandolfo

signaturesignature

Clock2 mths

I am using the Beta now; after VS upgrade it is still working. So this i a good sign. Thanks.

Clock2 mths


Thank you for your feedback!



David Grandolfo

signaturesignature

Clock2 mths