You Are Using HttpClient Wrong
Codewrinkles
View ChannelAbout
Your daily does of #DotNet videos. We cover a wide variety of topics like #AspNetCore, #Blazor, EntityFramework Core, software architecture and so much more. You'll also find here regular live coding sessions.
Latest Posts
Video Description
You are probably using the HttpClient wrong in .Net/C#. Why? Well, because the HttpClient implements IDIsposable and we tend to stick to the rule that we should wrap in a using everything that implements IDisposable.Well, that's not true in case of the HttpClient. Wrapping it in a using might even break your app. In this video I show you exactly why this happens and how we can fix it! #dotnet #csharp Join this channel to get source code access and other perks: https://www.youtube.com/channel/UCyTPru-1gZ7-4qblcKM0TiQ/join Content: 1. Intro: 00:00 2. Typical HttpClient use: 01:01 3. Socket exhaustion: 02:07 4. Solving the problem: 04:07 5. HttpClient in service classes: 04:55 6. It's always DNS! 07:01 Also follow me here (especially if you are a self taught developer): ✅My other channel: https://www.youtube.com/@DanPatrascuTech ✅Instagram: https://www.instagram.com/danpatrascutech/ ✅TikTok: https://www.tiktok.com/@danpatrascutech
Essential Gear for Photographers On-The-Go
AI-recommended products based on this video

SmallRig Z 8 L-Bracket for Nikon Z8 Z 8 Camera, Quick Release L Plate for Arca-Type for Nikon Z 8, Quick Switch Between Horizontal and Vertical Shooting, for Landscape, Animal Photography - 3942

NEEWER Zf Handgrip L Shape Grip for Nikon Z f, Ultra Thin Retro Formfitting Camera Mounting Baseplate with Handle & Aluminum Shutter Button Cap, Compatible with Arca Swiss Tripod Fluid Head, CA073

NEEWER CA076 Zfc Handgrip L Shape Grip for Nikon Z fc, Ultra Thin Retro Formfitting Camera Mounting Baseplate with Handle/Brass Shutter Button, Compatible with Arca Swiss Tripod Fluid Head, Black

NEEWER a6700 L Plate Compatible with Sony Alpha 6700, Quick Switch Aluminum Extendable Side Plate & Anti Twist Baseplate Compatible with Arca Swiss QR System DJI RS 2 RSC 2 RS 3 Pro Gimbals, CA048

SmallRig ZV-E10 II Base Plate for Sony Alpha ZV-E10 II, Bottom Mount Plate with Quick-Release Plate for Arca, QD Socket, Hand Strap Hole, 1/4"-20 Threaded Hole - 4950

SmallRig Baseplate for Sony Alpha 6700, Bottom Mount Plate Built-in Quick Release Plate for Arca, Supporting Quick Switch Between Tripod and Stabilizer (for DJI RS 2 / RSC 2 / RS 3 / RS 3 Pro) - 4338

ANXRE 71" Phone Tripod, NT79 Extendable Selfie Stick for Cell Phone&Camera Photo Video Kits, Travel Tripod Stand with Remote for Video Recording, Phone Holder Tripod Compatible with Phone Camera Gopro

Kaiess 62" Tripod for iPhone, Selfie Stick Tripod & Phone Tripod Stand with Remote, Cell Phone Tripod for iPhone, Extendable Travel Tripod Compatible with iPhone 14/13/12 Pro Max/Android

EUCOS 62" Phone Tripod, Tripod for iPhone & Selfie Stick Tripod with Remote, Extendable Phone Tripod Stand & Travel Tripod, Solidest Cell Phone Tripod Compatible with iPhone/Android

Jhcztrk 17.3 Inch Portable Monitor HDMI Type-C Laptop Gaming Monitor, 1600X900 with Built-in Speakers and Tripod External Slim Travel Monitors Second Monitors for Mac Smartphone PS4/PS5/ Gaming

SanDisk 64GB Extreme PRO SDXC UHS-I Memory Card - C10, U3, V30, 4K UHD, SD Card - SDSDXXU-064G-GN4IN

SanDisk 128GB Extreme PRO SDXC UHS-I Memory Card - C10, U3, V30, 4K UHD, SD Card - SDSDXXD-128G-GN4IN

Lexar 128GB Micro SD Card, microSDXC UHS-I Flash Memory Card with Adapter - Up to 100MB/s, A1, U3, Class10, V30, High Speed TF Card




