Click here to Skip to main content
Click here to Skip to main content

Tagged as

System.Net.WebException [HttpWebRequest_WebException_RemoteServer]

, 13 Jun 2013
Rate this:
Please Sign up or sign in to vote.
Frequent error using WCF in Silverlight.

Introduction 

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. 

Background  

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 

  1. Using a tool like fiddler is very helpful in finding a problem with a service call.
  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 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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

saguptamca
Software Developer
India India
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web02 | 2.8.140814.1 | Last Updated 13 Jun 2013
Article Copyright 2013 by saguptamca
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid