Hello I applied the article of weather API web service https://www.aspsnippets.com/Articles/Display-daily-Weather-Forecast-using-Weather-API-in-ASPNet.aspx but it doesnt work with me he sends me back this error message The remote server returned an error 401 unauthorized. please help me
Ligne 21 : using (WebClient client = new WebClient()) Ligne 22 : { Ligne 23 : string json = client.DownloadString(url); Ligne 24 : Ligne 25 : WeatherInfo weatherInfo = (new JavaScriptSerializer()).Deserialize<WeatherInfo>(json);
Hi afaf1311,
Verify your API Key. The API Key you are passing to the url is wrong.
I have checked sample its working without any error.
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.