We get this error: "System.Net.WebException The remote server returned an error: Not Found", sometimes while using Silverlight. It's sometimes a nightmare to resolve the error. We can follow small steps to resolve it.
Normally, If the service encounters an error while you are calling a method the Silverlight app will get a not found error.
Using the code
- Using a tool like fiddler is very helpful in finding a problem with a service call.
- 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 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.