Avatar

Authentication timeout with non-asyn method

0

Hello,

Upon authenticating using the SDK (both to 1803 and 1804 from 1802), it times out and doesn’t let us authenticate using a non-async method.  We have tried both on a mac and windows machine and it only doesn’t work on windows.  The mac app is running .netcore 2.1 and the windows is running .NET 4.7.1.  The code where it fails is

var api = new Geotab.Checkmate.API(“username/email”, “password”, null “database”, “server”);

api.Authenticate(); // THIS IS THE ISSUE ON WINDOWS

What is interesting, is if we use the async version of Authenticate on Windows, it will work

var api = new Geotab.Checkmate.API(“username/email”, “password”, null “database”, “server”);

await api.AuthenticateAsync(); // This now works

Please let us know if we need to do anything to get the non-async version working again.

 

Thanks,

Barb H.

Barb Hamlin

Please sign in to leave a comment.

7 comments

0
Avatar

I have the same issue,in my mvc application with framework 4.7.2 using de geoab sdk 1804.

Arturo Sotelo Enriquez 0 votes
0
Avatar

Hello Arturo,

The reason for the timeout issues with the Authenticate call is due to some references not being properly restored when updating the dll to 1804.

I would suggest you to use the Nuget Package Manager to update the dll and use a "dotnet restore" command. This will ensure that all project references are restored.

We have tested the non-async authenticate call on windows and it seems to work fine without any errors.

We have seen cases where other customers encountered this issue, and rebuilding their project properly helped resolve their issue.

Shivansh Singla 0 votes
0
Avatar

Has anyone figured out the issue here with a fresh project:

.net framework web app targeting 4.7.1 and not able to connect with the Geotab API?

Console apps work fine, web apps not the same since 1802.

Michael Head 0 votes
0
Avatar

Hello Michael, 

Can you please ensure that you have all the proper references after moving to the 1804 dll?

It seems like you are missing proper references on the server that hosts your web application since the console app is working fine.

Please use the Nuget Package manager to update the dll properly.

Can you also build a fresh project that only contains the below code, to make an authenticate call and see if it fails or succeeds.

var api = new API("username", "password,", "","database", null);

try{
  api.Authenticate();
}
catch (InvalidUserException){
  // Here you can display the error and prompt for user to re-enter credentials
  Console.WriteLine(" User name or password incorrect");
  return;
}
Shivansh Singla 0 votes
0
Avatar

Tried many times over.

Already sent to Steve at Geotab who is looking into it.  I will post back here when he figures it out.

Thanks,

Michael

Michael Head 0 votes
0
Avatar

*Update:  There is some kind of issue that is unknown at this time that is seen on Windows 10 and not Windows Server 2016 for 1803 and 1804 for .NET Framework.

Testing 1901 which I was told works on Windows 10 also.

Michael Head 0 votes