On my website I have some calls to an API.
In client side, with AJAX, it works perfectly but from server side (MVC and C#) I'm getting the following error:
The remote name could not be resolved 'api.website.com'
JsonSerializerSettings settings = new JsonSerializerSettings();
settings.ContractResolver = new CamelCasePropertyNamesContractResolver();
var data = JsonConvert.SerializeObject(email);
WebClient client = new WebClient();
var resp = client.UploadString(@"http://api.website.com/functions/email", data);
As @neuhaus wrote, the problem was due to a DNS setting, once it had been fixed it worked fine.