[Mono-list] WCF Empty Array Bug

marcg mgatley at data-afrique.com
Wed Mar 3 11:10:40 EST 2010


Hi, 

I am using a basicHttpBinding to communicate with an IIS 7 hosted WCF
service from a WinForms ported application (running on Mono 2.6.1). 

If the WCF Service returns an empty array or an object containing an empty
array the call results in the following exception: 

Exception in async operation: System.InvalidOperationException: Failed to
set va 
lue of type System.Collections.ArrayList for property
MonoTest.SearchService.DAS 
earchField[] Fields ---> System.ArgumentException: failed to convert
parameters 
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invoke 
Attr, System.Reflection.Binder binder, System.Object[] parameters,
System.Global 
ization.CultureInfo culture) [0x00000] in <filename unknown>:0 
... 

The error goes away if I return null instead of the empty array. 

Is this a known issue? Is there a fix/workaround - I have over 10 WCF
Service projects each with 20+ methods returning arrays which could be
empty. 
-- 
View this message in context: http://n4.nabble.com/WCF-Empty-Array-Bug-tp1576794p1576794.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list