AuthManagementApi issue on .Net Framework 4.6.1 after upgrading version of the sdk
Innotech-mohamad-zorba opened this issue · 15 comments
i have a legacy webform application .net framework 4.6.1, and another .net core 3.1 application,
both applications was using old version of management sdk,
after upgading to latest version 7.17.3 i noticed that the management async apis are working properly on .net core one but stuck on the webform one, it keeps loading without any response.
example:
var users = await manApiClient.Users.GetAllAsync(new GetUsersRequest() { Query = $@"email:""{email.ToLower()}""", SearchEngine = "v3" }).ConfigureAwait(false);
any suggestions please
Thanks for reporting.
What version of the SDK were u using before upgrading? Does rolling back to that version resolve the issue?
it was v-5.6.0, issue happened after upgrading to 7.17.3 and implement needed changes, before it was working properly for sure
That's a quite the version jump, did you read both migration guides ?
- https://auth0.github.io/auth0.net/migrating-to-v6.html
- https://auth0.github.io/auth0.net/migrating-to-v7.html
If those don't help, can you provide a minimal reproduction sample for us to look into so we can help indicate the cause?
the same upgrade done for .net core 3.1 project and all is fine there, so ithink it is a framework issue, the issue happened for the webform one, however i will read these guides and try to offer something to look at from your side. thanks
Important to note is that support for .NET Framework 4.6.1 was ended by Microsoft in April 2022. Probably best to try and see if the issue persist when using a version that is still supported, such as 4.6.2. And if it does, providing a sample as mentioned will still allow us to help determine the cause.
yes we know it is deprecated by microsoft and we have plan to upgrade it, but now trying to get it work with latest auth sdk version, however will try to send a sample having the issue asap.
same result on .net framework 4.8, not working
I have been unable to reproduce this behavior when trying out our SDK with .NET Framework 4.7.2 and 4.8.
i'll send you a quick sample using framework 4.8 and web application project on your email, check please and tell us if you find anything
sample sent to your gmail, check please.
Please provide a GitHub repository with the project instead of a zip file sent to my email, thanks.
https://github.com/innotech-mohammad-zorba/AuthManagApiSample.git
check default cs, note that the latest working version is 6.4.0 after that we have the above issue
I'm not sure what's happening or why your code works with 6.x, but not with 7.x. But what I did notice is that it works if you change the following code:
var manApiClient = new ManagementApiClient(_accessToken, new Uri(string.Format("https://{0}/api/v2", _auth0Domain)));
var users = manApiClient.Users.GetAllAsync(new GetUsersRequest() { Query = $@"email:""{_email.ToLower()}""", SearchEngine = "v3" }).GetAwaiter().GetResult();
to
var manApiClient = new ManagementApiClient(_accessToken, new Uri(string.Format("https://{0}/api/v2", _auth0Domain)));
var task = Task.Run(async () => await manApiClient.Users.GetAllAsync(new GetUsersRequest() { Query = $@"email:""{_email.ToLower()}""", SearchEngine = "v3" }, new PaginationInfo()));
var users = task.Result;
I am not sure why your code worked before, but it seems like something is different in the way it handles executing Async code Synchronously.
yes it works like that, anyway its enough for us so far, thanks for good support, appreciated
Closing this for now, can always reopen if this comes up again.