string str = (string)ServiceBrokerFactory.ExecuteMethod<IMainWCF>(WebConfig.GetValue("MainService"), pMethodName, new object[] { actionType, strCon });
无法序列化类型“System.Threading.Tasks.Task`1[System.String]”。请考虑将其标以 DataContractAttribute 特性,并将其所有要序列化的成员标以 DataMemberAttribute 特性。如果类型为集合,则请考虑将其标以 CollectionDataContractAttribute 特性。有关其他受支持的类型
在window server 2008下没有问题,但在2003下就报这个错了。
------解决思路----------------------
wcf写log看原因
http://www.cnblogs.com/jfzhu/p/4030008.html
------解决思路----------------------
元数据你弄懂了没?去看看元数据是怎么回事。
------解决思路----------------------
要想能序列化,传递的对象必须是标记为DataContract属性的类生成的,并且属性要标记成DataMember才行。而你这里传递的是System.Threading.Tasks.Task,这个肯定没有标记,也标记不了,因为这个是系统的类。