Hello,
The remote name could not be resolved
using (HttpClient client = new HttpClient())
{
client.BaseAddress = new Uri(System.BaseAddress);
client.Timeout = new TimeSpan(0, 0, System.Timeout);
public void Exception(Exception ex, string functionName, string url)
{
var ext = ex.InnerException;
while (ext != null)
{
ext = ext.InnerException;
}
throw new Exception($"Exception {functionName} = '{url}'\n \n{ex.Message}");
}
The connection must be established first. How long does that take? 10 seconds? Can I set that?
Timeout 2, when the connection is established, ask the question, no answer is sent back.
How can I solve the problem? What could be the reason?
The error occurs sporadically. On average after 200 requests.
Exception InnerException='An error occurred while sending the request.'
Exception InnerException='The remote name could not be resolved: 'public.api.XXXX.com''
Is the cause on the server or on the client?
I need to work out a solution, I don't have the experience.
Are there any links where it can be found? The customer says all good on the server.
Who is right?