Server Error in '/' Application.

The remote server returned an error: (401) Unauthorized.

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 server returned an error: (401) Unauthorized.

Source Error:


Line 44:         web_request.Credentials = CredentialCache.DefaultCredentials;
Line 45:         web_request.Timeout = 5000;
Line 46:         HttpWebResponse req_response = (HttpWebResponse)web_request.GetResponse();
Line 47:         Stream stream = req_response.GetResponseStream();
Line 48:         StreamReader stream_reader = new StreamReader(stream);

Source File: f:\websites\www.trustfeed.com\InvestorForm.aspx.cs    Line: 46

Stack Trace:


[WebException: The remote server returned an error: (401) Unauthorized.]
   System.Net.HttpWebRequest.GetResponse() +1751
   InvestorForm.getPriceTRFE() in f:\websites\www.trustfeed.com\InvestorForm.aspx.cs:46
   InvestorForm.Page_Load(Object sender, EventArgs e) in f:\websites\www.trustfeed.com\InvestorForm.aspx.cs:30
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4330.0