2

How can one clear the DNS cache of System.Net.WebClient as used by a site hosted on Azure Web Sites?

Related: How do I clear System.Net client DNS cache?

I don't wish to modify the code though, I'd like to keep using the cache, but only flush it once.

Context: A faulty DNS record change resulted in an API redirecting to a search engine, returning garbage from the perspective of its clients. One such client is a web application hosted on Azure Web Apps, which uses System.Net.WebClient server-side to hit the API. Now that the record is fixed, we'd like to flush the cache (or just that entry) so that everything goes back to normal before the end of the TTL.

(Obviously the question is time-sensitive and I'll keep looking, but I'd still be interested in a late answer, out of curiosity, if I can't find it in time.)

Community
  • 1
  • 1
tne
  • 6,417
  • 2
  • 38
  • 62

1 Answers1

0

Clear the application pool? Weird that no one suggested this answer yet.

NicoJuicy
  • 3,209
  • 3
  • 36
  • 63