Search
Get Started
C
C#
•
3y ago
Cracker
❔ How to handle DNS-IP Changes while use of static HttpClient in v4.8 ?
There is SocketsHttpHandler overload available in netcore2
.1 but how do I handle dns
-ip changes in framework 4
.8 project
?
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,010
Members
View on Discord
Was this page helpful?
Yes
No
A
Andrew
•
2/17/23, 11:23 PM
I think you
'd have to listen for the ETW events on resolution
, similar to this
:
https://www.meziantou.net/avoid-dns-issues-with-httpclient-in-dotnet.htm
Meziantou's blog
Avoid DNS issues with HttpClient in .NET - Gérald Barré
In this post
, I describe how to correctly configure an HttpClient instance to avoid issues with the connection pool and DNS changes
.
C
Cracker
OP
•
2/18/23, 9:04 AM
How about I cache the date httpclient instance is created and recreate it by controlling the date with parametric time period
?
@ryzngard
C
Cracker
OP
•
2/18/23, 9:04 AM
Looks like easier solution
A
Accord
•
2/19/23, 9:10 AM
Was this issue resolved
? If so
, run
/close
/close
otherwise I will mark this as stale and this post will be archived until there is new activity
.