You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For .net core, the solution is to use IHttpClientFactory, which needs to be adapted. Microsoft.Identity.Web should showcase how to do this. A better default for MSAL needs some investigation.
The text was updated successfully, but these errors were encountered:
bgavrilMS
changed the title
[Bug] Prevent HttpClient port exhaustion on .net classic
[Feature Request] Prevent HttpClient port exhaustion on .net classic
Apr 9, 2020
@bgavrilMS, regarding .netcore, are there somethings we can do better by default in the library (and perhaps will make it easier for Identity.Web and others to do the right thing and or their custom thing)?
I'll have a look at this. We could add a simplified version of IHttpClientFactory, or even a static HttpClient.
bgavrilMS
changed the title
[Feature Request] Prevent HttpClient port exhaustion on .net classic
[Feature Request] Prevent HttpClient port exhaustion
Apr 14, 2020
Which Version of MSAL are you using ?
4.11
Platform
net45, netcore
Affects confidential clients
Repro
Expected behavior
MSAL should work
Actual behavior
After some time, an exception from HttpClient occurs complaining about port exaustion.
Possible Solution
There is a solution on .net classic described here https://softwareengineering.stackexchange.com/questions/330364/should-we-create-a-new-single-instance-of-httpclient-for-all-requests
For .net core, the solution is to use IHttpClientFactory, which needs to be adapted. Microsoft.Identity.Web should showcase how to do this. A better default for MSAL needs some investigation.
The text was updated successfully, but these errors were encountered: