System.Net.WebException [HttpWebRequest_WebException_RemoteServer]

4820
3
12-14-2012 01:18 PM
ChandanaMalempati
New Contributor
Hi,

We have an internal website with a Silverlight plugin using ArcGIS API that displays feature graphics from 3 feature layers (Points, Polylines, Polygons). I am using ArcGIS Querytask to query feature layer graphics and calculate the union of all feature extents.

The below error occurs randomly in the QueryTask_Failed event whenever the users try to open the page that has this silverlight plugin.

System.Net.WebException The remote server returned an error: Not Found  (Please see the attachment)
Arguments: Not Found

I am unable to reproduce this error on my machine but it occurs on user's machines randomly (which is making it hard to debug).

I would appreciate if anyone can suggest me how to debug this issue.

Thank you,
Chandana
0 Kudos
3 Replies
ChandanaMalempati
New Contributor
I would appreciate any help on my previous post.
0 Kudos
SirishaMothukuri
New Contributor
I have read this somewhere, looks like one among these two point can be a solution to your issue

1. If the service encounters an error while you are calling a method the silverlight app will get a not found error. Using a tool like fiddler is very helpful in finding a problem with a service call

http://blogs.silverlight.net/blogs/msnow/archive/2008/10/20/silverlight-tip-of-the-day-63-how-to-mon...


2. The "Not Found" error is a generic response to a CommunicationsException that may occur due to an exception that occurs within the service call itself.

While Fiddler is a good tool for examining the requests/responses as well as the resources loaded, your best bet as Min-Hong Tang pointed out is to enable WCF tracing and use the WCF log viewer.

Under "Tools..." in Visual Studio, use the "WCF Service Configuration Editor".  Open the application configuration file for the service that you are testing and under the diagnostics node, you can choose to enable tracing and the logging of messages.  (Warning, these files can get very large, so remove them after debugging sessions or make sure that you disable when your debugging is done.)

There is a WCF log viewer that is part of the Platform SDK.  After running your application which is calling the service and you receive the error in your application, there will be a "*.svclog" file in the same directory in which your service is running.  You can double click on this file (if already associated with the viewer) and you can view all the details of the service calls, messages, responses, etc.

From the list on the left, go down and look at the items marked in 'red' and then look at the details of the exchange.  You will probably see many items marked noting that an exception has been thrown.  From here, you can select the item and usually get a very detailed message about the exception that occurred on the server, including the stack trace.

Regards.

Siri
0 Kudos
DominiqueBroux
Esri Frequent Contributor
If the error occurs unfrequently and randomly, it's probably coming from the server for example due to a time out after a long period of server inactivity.

As noticed by tek_siri, the best would be either to use fiddler to observe the requests or to log the events at server side. But if you can't reproduce the issue, it's hard to debug.

If most generally the second user attempt after a fail is working, you might implement it by code, i.e. in the Failed Handler, retry once to execute the request.
0 Kudos