0
votes

I have WCF service and A method of service returns byte[] array to silverlight client. I get exception at some point at some time other wise it works fine. The remote server returned an error: NotFound. what might be the possible reason?

 <binding name="plugWeb" closeTimeout="00:01:00" openTimeout="00:01:00"
      receiveTimeout="00:10:00" sendTimeout="00:01:00" maxBufferSize="2147483647"
      maxReceivedMessageSize="2147483647">
      <readerQuotas maxDepth="128" maxStringContentLength="2147483647"
        maxArrayLength="2147483647" maxBytesPerRead="4096" />
    </binding>

I changed <readerQuotas maxDepth="64" >to <readerQuotas maxDepth="128"> now its working fine.

Is that ok ?

what is <readerQuota /> in config file?

2
That's nowhere near enough information to figure out what's going on. What's different between when it works and when it doesn't? - Tad Donaghe
Also - turn on tracing and see what information it spits out. - Tad Donaghe

2 Answers

0
votes

Often, this is also reported when the server produces an exception, add a try-catch block to your service constructor and the service method you are calling and see what you get.

Another reason might be a changed method signature or the like and you forgot to update your service reference.

But as said by Terry, is there a code sample you can share or at least the steps to reproduce or what you have changed after it worked the last time?

0
votes

With silverlight its a very common error, firstly the error u r getting is a generic error which silverlight application shows for any service side error. Now the solution, try the find out the root cause of this error. There are various ways of doing this. Below is the one which i used for mine: 1) Add the below piece of code to ur config file of the wcf service

<system.diagnostics>
<sources>
  <source name="System.ServiceModel"
          switchValue="Information, ActivityTracing"
          propagateActivity="true">
    <listeners>
      <add name="traceListener"
          type="System.Diagnostics.XmlWriterTraceListener"
          initializeData= "D:\Sumit.svclog"/>
    </listeners>
  </source>
</sources>

this will generate an .svc, analyse this file it will provide you with a lot of information.

2) U can use external tools for analysing the wcf service calls, such as fiddler. In this case also try to analyse the service calls