The remote server returned an error

5883
12
06-15-2010 07:08 AM
Sravan_KumarUddarraju
New Contributor
Hi,

I am trying to access WMS and KML services (based on online-samples) in my WebApp, able to access them without any issue from my localhost. Then I published into test server and trying to access my WebApp from server then I am getting following error.

I installed fiddler and to see the error.
  �??The remote server returned an error: (401) Unauthorized.�??
Machine-Name  /Testing/ProxyHandler.ashx?http://mw1.google.com/mw-earth-vectordb/disaster/gulf_oil_spill/kml/noaa/nesdis_anomaly_rs2.kml

Regrds,
Srv
0 Kudos
12 Replies
DanielWalton
Occasional Contributor
Try using System.Net.WebRequest instead of WebClient:

WebRequest newRequest = System.Net.WebRequest.Create(new Uri(uri));
newRequest.Method = context.Request.HttpMethod;
newRequest.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);
WebResponse newResponse = newRequest.GetResponse();
-Dan
0 Kudos
roialgavish
New Contributor III

it seems that i have a similar problem but i did set the credentials in the proxy.config file.

any ideas?error.JPGerror1.JPG

0 Kudos
roialgavish
New Contributor III

The problem was resolved.

I needed to go to the service with the .local and not with .co.il

like this:

PathToProxy.co.il?PathToServiec.local

0 Kudos