C# – Passing a List from Silverlight using WCF

asp.netcnetsilverlightwcf

I have my WCF service defined as follows
[ServiceContract]
public interface IService1
{
[OperationContract]
IList GetMyTable();

    [OperationContract]
    void SendMyTable(List<RatePositions> ratePositions);

    [OperationContract]
    void SendString(string value);
}

When I call GetMyTable() from my SilverLight app it works fine, it brings a List of ratePositions into my app.
SendString() also works fine which sends a string from my app.

SendMyTable(List ratePositions) does not work which should sent a List of ratePositions from my app.

The error I get is:
The remote server returned an unexpected response: (404) Not Found

Any ideas why this method does not work but the others do?

Best Answer

The problem may be the message size problem with WCF. Look at both the clientconfig file that is created in your silverlight project as well as the web.config in your server project to make sure the size of the data you're returning is not too large.

The 404 error is a catch all for any WCF failure. Can you debug the server code to see if its getting that far?