Server Error in '/' Application.

The remote name could not be resolved: 'download.finance.yahoo.com'

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The remote name could not be resolved: 'download.finance.yahoo.com'

Source Error:


Line 17:         string url = String.Format(urlPattern, fromCurrency, toCurrency);
Line 18:         WebClient resp = new WebClient();
Line 19:         string response = resp.DownloadString(url);
Line 20:         decimal exchangerate = decimal.Parse(response, System.Globalization.CultureInfo.InvariantCulture);
Line 21:         int localprice = Convert.ToInt32(amt * exchangerate);

Source File: c:\HostingSpaces\admin\website.bestwebsitemakers.com\wwwroot\App_Code\CurrencyConverter.cs    Line: 19

Stack Trace:


[WebException: The remote name could not be resolved: 'download.finance.yahoo.com']
   System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +3082861
   System.Net.WebClient.DownloadString(Uri address) +129
   CurrencyConverter.Localprice(String toCurrency, String amount) in c:\HostingSpaces\admin\website.bestwebsitemakers.com\wwwroot\App_Code\CurrencyConverter.cs:19
   Estimate.Page_Load(Object sender, EventArgs e) in c:\HostingSpaces\admin\website.bestwebsitemakers.com\wwwroot\Estimate.aspx.cs:50
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.5485; ASP.NET Version:2.0.50727.5483