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
{{ message }}
Repository navigation
Document guidance about when to use and not use HTTP Client Factory #11882
Using the Microsoft.Extensions libraries outside of ASP.NET Core is a great way to start modernizing an older application, and has resonated really well with some users I have talked to about it.
Reacted by Patrick Westerhoff, Charley Wu, erndob, Eric Sampson, Sridhar Pasham, mnoreen, Gil Rempto, damienbod, Eric Mutta, Tore Olav Kristiansen and 2 more
changed the title [-]Document guidance about HTTP Client Factory[/-][+]Document guidance about when to use and not use HTTP Client Factory[/+]on Apr 7, 2019
Thanks Ryan. It would also be helpful to have documentation on how to incorporate HttpClientFactory with alternate IoC Container providers like autofac and Castle Windor.
Is the HttpPipeline a sibling of the HttpClient? Does .NET have something similar to the HttpPipeline that is primitive and can be used during the generic host build stage?
I would like to see guidance, recommended code for using HttpClient in Web Forms. Not asp.net on .net core, not MVC... ASP.NET Web Forms. Fair to expect a web forms website to be running on latest framework (e.g. 4.8). Assume there is no added on dependency injection system. How to properly instantiate HttpClient and use it w/out "exhausting sockets" issue?
Reacted by Dai, Andrew Stanton and Tudor-Aurel Turcu
@Jehoel Thank you! I hope to experiment w/ your WebForms DI project. And your write up is of particular interest. We have a very mature, 10+ year asp.net webforms solution, still going strong (current on the full Framework 4.8). But... we are trying to figure out how to bridge over to .NET core (or just the "new" .NET), pretty much exactly as you write. We'd like to spin up side by side websites, but there's just a whole of truly fundamental things to contend with... authentication being one of the most significant bits (as in how to use the same auth cookie in a side by side website scenario)! We have many base pages that .aspx pages inherit from, we have dozens of our own server controls and dozens more user controls. Would love to hear more about your experiences.
@rynowak Any updates on this issue?
I'm also searching for a guidance on how to best use HttpClient, in an ASP.NET MVC 5 application (.NET Framework 4.7), without a DI framework and without taking a dependency on Microsoft.Extensions.DependencyInjection or Microsoft.Extensions.Hosting
Activity
[-]Document guidance about HTTP Client Factory[/-][+]Document guidance about when to use and not use HTTP Client Factory[/+]ericsampson commentedon Oct 24, 2019
Thanks Ryan. It would also be helpful to have documentation on how to incorporate HttpClientFactory with alternate IoC Container providers like autofac and Castle Windor.
SridharPasham commentedon Oct 25, 2019
Thanks @rynowak I was looking for the usage of HttpClientFactory without startup class. The link which you provided for Global.asax helped me. Thanks.
changhuixu commentedon Mar 26, 2020
Hi, I followed the issue https://github.com/dotnet/extensions/issues/1345 to here.
I am curious about how does Azure key vault work when we add it as a configuration provider during the
ConfigureAppConfigurationstage. So I took a look at the source code for AzureSDK.Azure SDK has a concept,
HttpPipeline, which represents a primitive for sending HTTP requests and receiving responses.https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/core/Azure.Core/src/Pipeline/HttpPipeline.cs
Is the
HttpPipelinea sibling of theHttpClient? Does .NET have something similar to theHttpPipelinethat is primitive and can be used during the generic host build stage?Thank you.
mnoreen commentedon Sep 23, 2020
I would like to see guidance, recommended code for using HttpClient in Web Forms. Not asp.net on .net core, not MVC... ASP.NET Web Forms. Fair to expect a web forms website to be running on latest framework (e.g. 4.8). Assume there is no added on dependency injection system. How to properly instantiate HttpClient and use it w/out "exhausting sockets" issue?
daiplusplus commentedon Jan 22, 2021
@mnoreen If it helps, I wrote this to make it easy to use MEDI in WebForms: https://github.com/Jehoel/AspNetDependencyInjection - I use it with
IHttpClientFactorywithout problems.mnoreen commentedon Jan 22, 2021
@Jehoel Thank you! I hope to experiment w/ your WebForms DI project. And your write up is of particular interest. We have a very mature, 10+ year asp.net webforms solution, still going strong (current on the full Framework 4.8). But... we are trying to figure out how to bridge over to .NET core (or just the "new" .NET), pretty much exactly as you write. We'd like to spin up side by side websites, but there's just a whole of truly fundamental things to contend with... authentication being one of the most significant bits (as in how to use the same auth cookie in a side by side website scenario)! We have many base pages that .aspx pages inherit from, we have dozens of our own server controls and dozens more user controls. Would love to hear more about your experiences.
daiplusplus commentedon Jan 23, 2021
@mnoreen Sure, I'll be happy to. Please create a new discussion in that repo so we don't detail this thread: https://github.com/Jehoel/AspNetDependencyInjection/discussions
tudor-turcu commentedon May 6, 2022
@rynowak Any updates on this issue?
I'm also searching for a guidance on how to best use HttpClient, in an ASP.NET MVC 5 application (.NET Framework 4.7), without a DI framework and without taking a dependency on Microsoft.Extensions.DependencyInjection or Microsoft.Extensions.Hosting