我使用serialization参数(设置为“unidirectional”)使用spmetal生成实体类。但是,当我使用这些类作为WCF方法的返回值时,我收到以下错误:
System.ServiceModel.CommunicationException was unhandled by user code
Message=The server did not provide a meaningful reply;
this might be caused by a contract mismatch,
a premature session shutdown or an internal server error.
使用我自己的课程完美无瑕。可以在此处查看SPMetal创建的代码:http://pastebin.com/kjEvUAgS
有人知道SPMetal和WCF是否很好地协同工作?