Friday, October 24, 2008

The type System.Collections.Hashtable is not supported because it implements IDictionary..

My portal cannot consume a WCF web method which has HashTable as the input parameter.

The exception I got is:

exception: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: The type System.Collections.Hashtable is not supported because it implements IDictionary..

What made me desperate is that I changed the parameter from HashTable to ArrayList and even object[]. But I still got the same error when calling this web method.

...Eventually, I found at the end of this web method, there is "typeof(HashTable)". That means HashTable cannot be a parameter or exist anywhere in the web method!

No comments: