有没有办法将 SPMetal 生成的类与 WCF 服务应用程序一起使用?
我使用序列化参数(设置为“单向”)使用 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一起玩好不好?
I generated entity classes with spmetal using the serialization parameter (set to "unidirectional"). However, when I use those classes as return value for a WCF method, I get the following error:
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.
Using my own classes works flawless. The code that SPMetal created can be viewed here: http://pastebin.com/kjEvUAgS
Does anybody know if SPMetal and WCF play together nicely?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论