Skip to main content

Just updated from version 5.3 to version 8 of C# esign SDK (integrating w/ .NET Framework 4.8 MVC App) to take advantage of “IncludeAnchorTabLocations”.
Didn’t realize it would mean completely rewriting everything to use async since the synchronous methods now just call the async method .GetResult()

public OAuth.OAuthToken RequestJWTUserToken(string clientId, string userId, string oauthBasePath, byteh] privateKeyBytes, int expiresInHours, List<string> scopes = null)
{
CancellationTokenSource cts = new CancellationTokenSource();
return TryCatchWrapper(() => RequestJWTUserTokenAsync(clientId, userId, oauthBasePath, privateKeyBytes, expiresInHours, scopes, cts.Token).ConfigureAwait(false).GetAwaiter().GetResult());
}
comparison of v7 (synchronous-safe) w/ v8 (synchronous-unsafe)

Took me way too long to figure out why the application was hanging. Warning to anyone out there upgrading to v8 -- beware of deadlocks if you’re not using the async methods!

Hi,

Thank for your confirming the issue, I can see there is already a reported issue on the github repository: https://github.com/docusign/docusign-esign-csharp-client/issues/454

Upgrading to use async methods will resolve the issue but will have that issue raised to resolve it in the future.


Reply