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 182:
Line 183:
Line 184:                            HttpWebResponse resp = (HttpWebResponse)httpWebRequest.GetResponse();
Line 185:                            string respStr = new StreamReader(resp.GetResponseStream()).ReadToEnd();
Line 186:                            lblError.Text += "Response : " + respStr; // if you want see the output

Source File: d:\inetpub\wwwroot\FAITHNETWORK_VAULT\FISHNET\MANGUSREALTYGROUP\listing.aspx.cs    Line: 184

Stack Trace:


[WebException: The remote server returned an error: (401) Unauthorized.]
   System.Net.HttpWebRequest.GetResponse() +1686
   _Default.getListingAPIKey() in d:\inetpub\wwwroot\FAITHNETWORK_VAULT\FISHNET\MANGUSREALTYGROUP\listing.aspx.cs:184
   _Default.Page_Load(Object sender, EventArgs e) in d:\inetpub\wwwroot\FAITHNETWORK_VAULT\FISHNET\MANGUSREALTYGROUP\listing.aspx.cs:107
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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