Geeks With Blogs

News Tricension
Wes Weeks

We are building an application in Silverlight 2 using WCF for data access.  Everything has been going fairly well, but one of the developers on my team came across this error trying to insert some data:

"The remote server returned an error: NotFound"

Now the error seems to suggest that there is something wrong with the service.  Binding isn't correct, something wrong with the contract interrface, etc.  If you've ever tried to debug a silverlight applicatino, you know you can't attach to it with something like fiddler to see what traffic is being sent across the wire.  Very frustrating and significant time was spent  looking into the problem.  There are several posts on this issue and they all seem to suggest that this is where you need to look.

Turns out it had nothing to do with WCF.  The method being invoked by the web service was erroring but the error information itself wasn't being propogated.  It was sending this 'NotFound' message. 

So if you run across this problem, right some tracing or test cases to ensure the method wrapped by the web service itself works.  I beat the developer on my team with a wet noodle for not having tested his method prior to exposing it as a service.

Posted on Wednesday, January 28, 2009 9:50 AM | Back to top


Comments on this post: "The remote server returned an error: NotFound"

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
Hi, I am a method which just returns one string .. code is here..



[WebMethod]
public string GetInfo()
{
try
{
return "Get Info";
}
catch (Exception exp)
{
return "-1";
}
finally
{

}
}

but still I am having this error.. what you think could be the reason..
Left by Shahid Kapoor on Apr 01, 2009 7:33 AM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
I tried this on my end and am not getting the issue. Could actually be a problem with the service endpoint in this case.
Left by Wes Weeks on Apr 01, 2009 8:59 AM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
try to update your web server ...
after each change to made in it you have to update to enable changes in your second project.
Left by sA21 on May 25, 2009 4:38 PM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
hello, i have WCF web service which insert xml data, when i insert simple serialized data, it function without errors and when i serialize Images and i use that Web Service it returns this error message : The remote server returned an error: NotFound
Left by Yasine on Jun 09, 2009 3:46 PM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
I have same problem. In my case it works with FireFox but not on IE.
Left by Vips on Jul 07, 2009 12:14 AM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
I have the same error, also returning 1 simple string that i know works, it will work for about 20-30 mins perfectly then throws the exception. i am clearing all my varibles and even calling GC.Collect on my webservice at every method. I am at wits end and dont know where to turn to fix it. any help or suggestions will be much appreciated.

Regards
Left by Wade on Sep 01, 2009 9:17 AM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
I got this message too. I trapped the error on the server and looked at the stack trace. Turned out I messed up on passing one of the parameters to a sp. This was each to see in the stack trace.

I think there error is a general purpose error that provides 0 information. I could pass the stack trace back to the SL3 client as a string, but there must be a better way to handle such errors.
Left by JC on Sep 21, 2009 4:55 PM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
step into the WCF project in debug mode...it will help to find out the actual error...it helped me
Left by VK on Jan 14, 2010 6:48 PM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
Even microsoft don't know about this problem. there is no solution for this problem.
Left by Naved on Feb 19, 2010 5:09 AM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
Here it works (well... actually doesn't at all) like Vips's: it works like a charm in Firefox, but get this error in IE.
Left by Jairo on Feb 21, 2010 2:44 PM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
Try to create a clientaccesspolicy.xml file and put it in the web service. It worked fine for me
Left by Mr.K on Mar 18, 2010 10:30 AM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
I had the same issue, i was just entering a -1 parameter rather than a parameter that would mean something.
Left by dd on Mar 24, 2010 6:20 AM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
can anyone help me to resolve this issue....
Left by ramesh on Jun 22, 2010 3:24 AM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
The remote server returned an error: NotFound
Left by ramesh J on Jun 22, 2010 4:08 AM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
this proplem also with me .some time i get this Error
when i save data from silverlight
Left by amr on Jul 27, 2010 4:20 PM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
{System.ServiceModel.CommunicationException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound.
at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
at System.Net.Browser.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)
--- End of inner exception stack trace ---
at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
--- End of inner exception stack trace ---
at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
at Symphony.Care5000.Application.CommonAgent.CommonClient.CommonClientChannel.EndGetServices(IAsyncResult result)
at Symphony.Care5000.Application.CommonAgent.CommonClient.Symphony.Care5000.Application.CommonAgent.ICommon.EndGetServices(IAsyncResult result)
at Symphony.Care5000.Application.CommonAgent.CommonClient.OnEndGetServices(IAsyncResult result)
at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)}
Left by Venkatesh on Dec 24, 2010 6:39 AM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
I have faced this issue once and, in fact, that was hapening a error inside my WCF service, and than, this message was throw.

After some research, I realized that this message is throw always that some error occur inside the WCF service.
Left by R2O on Jan 11, 2011 11:44 AM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
help please
Left by mit on Feb 21, 2011 1:24 AM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
Hi, Try just loading a single record without any text fields or images and saving it. That will tell you quickly whether or not this is the problem, my guess is it is related to the size. You can use the SelectAllExcept( ... ) method to exclude any large columns.
Left by Guruji on Mar 12, 2011 5:19 AM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
Enabling Web Service Extension - ASP.NET v4.0.30319
Left by NKhan on Mar 09, 2012 6:35 PM

# re: "The remote server returned an error: NotFound"
Requesting Gravatar...
I face the same problem too.
1st time call to web service will return this error.
However, 2nd time call and above will success.

Found out the service reference should map to the web service in the following format.
http://PC name.domain.ad:port/service name.svc

Please use Asp.net trace.axd to get the server name.
Left by CG on Apr 05, 2012 3:51 AM

Your comment:
 (will show your gravatar)


Copyright © Wes Weeks | Powered by: GeeksWithBlogs.net