LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Google Drive - Google.Apis.Requests.RequestError Invalid Credentials [401]

History:

I create a .dll using .Net Framework (4.5.2) to communicate with Google Auth and Google Drive without any issue from last year till 25/Feb/2022.

Out of sudden, the .dll is not able to use and I Check with C# code if using .net Framework (4.5.2) is not working any more.

It return the error: 

Google.GoogleApiException: 'Google.Apis.Requests.RequestError
Invalid Credentials [401]

error.PNG

So I change the .dll with .Net Framework (4.8) and it work fine in the Visual Studio with .exe file.

 

But When I load it with LabVIEW it prompt back the error :

Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: Google.GoogleApiException: Google.Apis.Requests.RequestError
Invalid Credentials [401]
Errors [
Message[Invalid Credentials] Location[Authorization - header] Reason[authError] Domain[global]
]

 

I try to change CLR Version but not successful. current CLR version is 4.0.30319.42000

.net.png

Below is the config file I added in the same Labview.exe folder.

 

LabVIEW.exe.config:

 

<?xml version ="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.8.4420" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>

 

Tested with LabVIEW 2020 32Bit,  LabVIEW 2020 64Bit,  LabVIEW 2021 32Bit all not working.

 

 

Thanks in advance. 

0 Kudos
Message 1 of 2
(1,290 Views)

May I know how to force LabVIEW to use .Net Framework 4.8? 

0 Kudos
Message 2 of 2
(1,222 Views)