none
CommunicationException Error Meesage "Not Found"

    Question

  • Hi, everyone:

    I encounter a annoying issue for a long time. There are two solution, the first one is silverlight website, the second one is a local wcf service solution. The silverlight solution invoke wcf service's method to retrieve some data. The local wcf service access remote web service use proxy class(The remote web service without cross domain policy xml file). The issue is I could use local wcf service retrieve the remote data(step by step debug), but when the data return to silverlight, error occured within silverlight project service reference.cs, error message as below:

    The remote server returned an error: NotFound.

     

    1    AlternateWcfService.BusinessServices.ModifyEnrouteAlternateList.RetrieveEnrtAltnGUIRS IFPServices.RetrieveEnrtAltnGUI(AlternateWcfService.BusinessServices.ModifyEnrouteAlternateList.RetrieveEnrtAltnGUIRQ request)
    2    		{
    3    			ModifyEAListBS.FLPService service = new AlternateWcfService.BusinessServices.ModifyEnrouteAlternateList.FLPService();
    4    			ModifyEAListBS.RetrieveEnrtAltnGUIRS response = service.RetrieveEnrtAltnGUI(request);
    5    
    6    			if (response.Item is ModifyEAListBS.ErrorsType)
    7    			{
    8    				return response;
    9    			}
    10   			else if (response.Item is ModifyEAListBS.SuccessType)
    11   			{
    12   				return response;
    13   			}
    14   			
    15   			return response;
    16   		}
    

    Class RetrieveEnrtAltnGUIRS, RetrieveEnrtAltnGUIRQ and FLPService are come from proxy class. I made a experiment, the sample code as below:

    1    FlightEnrtAltnScenario IFPServices.OnlyForTest()
    2    		{
    3    			FlightEnrtAltnScenario scenario = new FlightEnrtAltnScenario();
    4    			scenario.ApplScenario = false;
    5    			scenario.FlightId = 234M;
    6    			scenario.Id = 1;
    7    			scenario.Remark = "remark";
    8    			scenario.Title = "title";
    9    			return scenario;
    10   		}
    
     

      

    FlightEnrtAltnScenario is a entity class for test purpose(It it not within proxy class, generate by myself). And then, I do some mock data, such as 234M, 1, remark, title. After that, I use silverlight invoke this method, It worked. So, I confuse with this problem. Need some help. Thank you very much!

    BTW: I have tried to use Fiddler to monitor http traffic. The remote service return status code with 200 and return result with xml format. so I think local service invoke the remote service should be OK.

    Tuesday, October 13, 2009 10:19 AM

Answers

  • Hi yipingw,

    You want to copy your :

    <system.serviceModel>

    <bindings>

    <basicHttpBinding>

    <binding name="BasicHttpBinding_ITestService" maxBufferSize="2147483647"

    maxReceivedMessageSize="2147483647">

    <security mode="None" />

    </binding>

    </basicHttpBinding>

    </bindings>

    <client>

    <endpoint address=http://xxx.xxx.com/TestService/TestService.svc

    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ITestService"

    contract="TestServiceReference.ITestService" name="BasicHttpBinding_ITestService" />

    </client>

    </system.serviceModel>

    Tuesday, October 13, 2009 11:47 AM
  • Hi everyone,

     I have resolved this issue. The origin of this issue is about xml serialize, you need add [XmlSerialize] discription at service method signature.

    Friday, October 23, 2009 1:53 AM

All replies

  • Have you updated your web.config with the information from the ServiceReference.config?

    Tuesday, October 13, 2009 11:05 AM
  • Hi Ardman,

    What's the infomation do I update from ServiceReference.config to Web.config?

    Tuesday, October 13, 2009 11:45 AM
  • Hi yipingw,

    You want to copy your :

    <system.serviceModel>

    <bindings>

    <basicHttpBinding>

    <binding name="BasicHttpBinding_ITestService" maxBufferSize="2147483647"

    maxReceivedMessageSize="2147483647">

    <security mode="None" />

    </binding>

    </basicHttpBinding>

    </bindings>

    <client>

    <endpoint address=http://xxx.xxx.com/TestService/TestService.svc

    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ITestService"

    contract="TestServiceReference.ITestService" name="BasicHttpBinding_ITestService" />

    </client>

    </system.serviceModel>

    Tuesday, October 13, 2009 11:47 AM
  • Thanks Ardman, I'll try it at this morning (UTC + 08:00)

    Tuesday, October 13, 2009 12:21 PM
  • Hi,

    Also, you can look at primary data of exception with Fiddler tool.

    Tuesday, October 13, 2009 2:27 PM
  • Hi there,

    My question is related to this, why do I only get "The remote server returned an error: NotFound" and not the FaultException raised in WCF? I have detail exceptions switched on at the WCF side, not running in debug mode, but still get no detail. It is available in Fiddler but I can't get to it on the Silverlight side. What am I missing please?

    Thursday, October 22, 2009 10:03 AM
  • Have you turned off CustomErrors?

    Thursday, October 22, 2009 10:09 AM
  • Just did, made no difference. <customErrors mode="Off"/>  in the web.config of the host?

    I must be doing something stupid somewhere, just not sure what. :)

    To re-cap:

    • Exception is visible in fiddler as what the cause is, this is a FaultException is part of the ServiceModel assembly.
    • CompletedEventArg's e.Error and InnerException is "Not Found"
    • customError is off
    • detailException in the WCF web.config is true
    • Not getting it in Silverlight.
    Thursday, October 22, 2009 10:23 AM
  • Just found that SOAP faults do not propogate to Silverlight for reasons explained here, apparently will be addressed in future releases. There are workarounds explained but nothing like we used to in WCF.

    http://eugeneos.blogspot.com/2008_09_01_archive.html

     

    Thursday, October 22, 2009 11:58 AM
  • Hi everyone,

     I have resolved this issue. The origin of this issue is about xml serialize, you need add [XmlSerialize] discription at service method signature.

    Friday, October 23, 2009 1:53 AM