1

I use WCF service for implementing getting data from database (using Entity Framework and LINQ on the service side). But when the service returns data I receive error: The underlying connection was closed. The connection was closed unexpectedly. How can I bypass it ?

4

1 回答 1

0

如果不返回强类型对象,则必须将其更改为强类型对象。当您返回一个对象时,它必须被序列化为 XML。并且序列化器不知道如何序列化一个类型object或匿名类型的对象,因为它不知道它必须序列化什么类型的对象或类的属性是什么等。

于 2013-03-16T16:15:16.683 回答