I have a WCF service, that is called from my Silverlight 3 application (with C#). The service is called for each item in a user filled listbox. When only one item is contained in the listbox, everything works fine. Multiple items cause an error sometimes. I tested a bit around and sometimes I get an error with 2 items, sometimes not. With 4 items test, one time I get 2 results returned, after that the error.
Worst thing, that the error simply says "The Remoteserver has returned an Error: NotFound". The Error is a "CommunicationException" and is thrown in the EndMethod(System.IAsyncResult result) method
Here's the call:
foreach (ListBoxItem lbItem in categorySeeds)
{
Helper.Instance.service.ClusterAsync(Helper.Instance.language.value,
((KeyValuePair<string, int>)lbItem.Tag).Value,
Helper.Instance.clusterLevel,
Helper.Instance.clusterDelay,
Helper.Instance.clusterTolerance,
Helper.Instance.clusterMaxCategories,
Helper.Instance.similarity);
}
I remember that I once "solved" the problem by calling "reuse" of the AppPool that contained my WCF ... so maybe there is something wrong with the configuration? Does anyone know if I can make the WCF returning a more meaningful error message than just "NotFound"?
Thanks in advance, Frank
ANSWER: The problem was caused by the concurrent access of the multiple WCF-Service-Calls. The service calls StoredProcedures that work with a Synonym-Objects that each SP changes to a value given by a parameter ... so I have to fix it there.