Asynchronous WCF error

Asynchronous WCF error

Old forum URL:

mikevalentino posted on Wednesday, January 27, 2010

Hi everybody,

I am currently using version 3.6.0 and try to run the asynchronous data portal call using the BeginFetch method in DataPortalT with WcfProxy. However, I encounter the following error:

There was an error while trying to deserialize parameter  Please see InnerException for more details.

When I debug the error happens at the following method Fetch of WcfProxy class:

response = svr.Fetch(New FetchRequest(objectType, criteria, context)

I use basicHttpBinding in the app.config and web.config respectively.

Is there any problem that causes the WcfProxy does not work in the BackgroundWorker or is there is anything in the configuration that I missing? When I switch it back to use Fetch method in DataPortalT, it works perfectly fine. I am puzzled.

Desperately in need of guidance.

A thousand thanks.

From Mike

RockfordLhotka replied on Thursday, January 28, 2010

You are using the VB version of the framework?

I strongly recommend using that only for reference. You should use the C# version of the framework for anything real. The C# version undergoes a lot more testing and generally has a more reliable implementation of the async behaviors.

In fact, the reason I quit building and maintaining the VB code was because of the difficulty in getting async code working in VB. The multiline lambda feature in C# makes this code almost infinitely easier, and I just wasn't willing to deal with the pain VB incurred.

Fortunately several members of the community stepped forward (Sean Rhone most of all) and did port the code to VB, pain and all.

But even so, that code is for learning and reference, not for actual use.

mikevalentino replied on Thursday, January 28, 2010

Hi Rocky,

Yes. You are right. I am using VB version of CSLA because I am from the old school of VB6, so developing using VB .NET is easier for me. :)

I will try to use the C# version to see if the problem goes away.

Thanks for your advice.

RockfordLhotka replied on Thursday, January 28, 2010

You can still develop your code in VB - that's fine!

I'm just suggesting that you use the C# framework. Your code should be unaffected.

Copyright (c) Marimer LLC