Tutorial :problem when sending images through wcf from silverlight



Question:

Silverlight uses WCF with basicHttpBinding

<basicHttpBinding>                    <binding name="BasicHttpBinding_BugsService"                maxBufferSize="2147483647"                maxReceivedMessageSize="2147483647">                           <security mode="None"/>      </binding>                </basicHttpBinding>  

I send the image as an byte[], and it's working as long as the image has less than 20KB

but when it's bigger i get the error:

The remote server returned an error: NotFound

in the Reference.cs

public bool EndSave(System.IAsyncResult result)   {      object[] _args = new object[0];      bool _result = ((bool)(base.EndInvoke("Save", _args, result))); // error      return _result;  }  


Solution:1

Please catch the exception on the wcf side in the interface implementation and post that.

The error may be related to this problem: "WCF Message Size Issue"


Solution:2

Check the "maxReceivedMessageSize" property (representing the size in bytes) on the binding configuration. If your data exceeds that size, the message is discarded.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »