Sporadic Arg_COMException in Silverlight when loading data from RIA service

Users sometimes get a strange exception when working with the application. I could never reproduce it. This occurs when a single domain service request is made. This query is executed quite often (each time the user saves the changes).

There are no parameters in the request. Simple filtering: Context.GetEventsQuery (). Where (lce => lce.Id> maxId)

The domain service method is simple: open IQueryable GetEvents () {return ObjectContext.Events; }

After this happens for the first time, it continues to happen every time (until the user refreshes the web page).

Here is the text of the log exclusion: Download failed for the GetEvents request. System.ServiceModel.DomainServices.Client.DomainOperationException: The load operation failed for the GetEvents request. ---> System.Exception ---> System.Exception: [Arg_COMException] Arguments: Debugging resource strings is not available. Often, the key and arguments provide enough information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50917.0&File=mscorlib.dll&Key=Arg_COMException in System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse (IAsyncResult asyncResult). BrowserHttpWebRequest. <> c__DisplayClass5.b__4 (Object sendState) in System.Net.Browser.AsyncHelper. <> c__DisplayClass2.b__0 (Object sendState) --- The end of the internal check of the exception stack --- in System.ServiceModel.DomainServices.Client.WebDomainClient`1.EndQueryCore (IAsyncResult asyncResult) in System.ServiceModel.DomainServices.Clientndomu (IAsyncResult asyncResult) in System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad (IAsyncResult asyncResult) --- End of internal exception stack check --- in System.ServiceModel.DomainServices.Client.OperationBase.Complete () error. ServiceModel.DomainServices.Client.LoadOperation.Complete (exception error) in System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad (IAsyncResult asyncResult) in System.ServiceModel.DomainServices.Client.DomainContext. <> c__DisplayClass1b.b__17 (Object)

What could be the reason?

+6
exception service silverlight ria
source share
1 answer

We had the same sporadic problem. Traced it to the state of the race, when we simultaneously caused a "load" on the domain data source.

In our case, we wrote the attached behavior for domaindatasource called "DurableDomainDataSourceBehavior". This job was to catch failed downloads, check if there was an error message, and if so, wait a few seconds before trying to download again. We found that we had incorrect logic that included multiple instances of behavior in one instance of domaindatasource. When an end-user encounters a network-related problem, loading each instance of DurableDomainDataSourceBehavior will cause a load that will result in an arg_ComException error. The fix was to make sure that we did not add multiple instances of behavior to one instance of domaindatasource and looked for other places in the code where we could call DomainDataSource.Load more than once at the same time.

I am not sure if this is specific to DomainDataSource, or if it can be played using DomainContext. I could not reproduce the problem locally, but I can confirm that since our fix no longer appears in the logs.

+4
source share

All Articles