microsoft-authentication-library-for-dotnet icon indicating copy to clipboard operation
microsoft-authentication-library-for-dotnet copied to clipboard

[Bug] Replace HttpClient factory on .NET fwk with the one on .NET Core

Open bgavrilMS opened this issue 2 years ago • 3 comments

Looks like the .NET fwk factory is throwing a lot of timeout errors:

image

Suggested fix: use .NET Core's factory on .net

bgavrilMS avatar Aug 02 '22 15:08 bgavrilMS

amazing! Do we know if the .NET Core would throw less?

jmprieur avatar Aug 02 '22 15:08 jmprieur

yes, I think @pmaytak figure that one out - it's because on .NET Core we use a simple HTTP Factory (a static HttpClient) + Id.Web uses fancy scalable one. But on .NET Fwk we use a more complex HTTP Factory where we try to be smart about DNS refreshes etc.

bgavrilMS avatar Aug 02 '22 15:08 bgavrilMS

Btw, I updated the query to also print out occurrences of this error in Id.Web. And there aren't any. Well done @jennyf19 and @jmprieur for using a scalable solution in Id.Web

bgavrilMS avatar Aug 02 '22 17:08 bgavrilMS

More details sent via email, but in general: there seems to be 2.2x fewer errors with the updated Http client on Msal.Desktop.

pmaytak avatar Nov 10 '22 10:11 pmaytak