EF4 +中的序列化问题没有客户端的外键(序列化)? [英] Serialization problem in EF4 + no Foreign keys on client side (serialized) ?

查看:108
本文介绍了EF4 +中的序列化问题没有客户端的外键(序列化)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我们刚刚将我们的解决方案转换为vs2010。

Hi we just converted our solution to vs2010.

一切正常。

 

然后我们转换EF模型以支持外键和&多元化。 (我们从数据库中重新创建了模型)

Then we converted the EF model to support Foreign keys & pluralization. (we recreated the model from the db)

在服务器端,这可以正常工作,但在客户端方面似乎存在序列化问题。

On the server side this works ok, but on the client side there seems to be a serialization issue.

当在服务器端我们在EF查询中使用".include(" nametable")时,我们总是在客户端上收到错误,如:

When on the server side we use a ".include("nametable") in an EF query we always get an error on the client like :

格式化程序引发异常尝试反序列化消息时:尝试反序列化参数http://tempuri.org/:ReadDeviceSubTypesResult时出错。 InnerException消息是'反序列化的对象,引用ID为'i11'而不是
在流中找到。'

The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:ReadDeviceSubTypesResult. The InnerException message was 'Deserialized object with reference id 'i11' not found in stream.'

 

另外:外键似乎没有在客户端上序列化,我们只能在服务器端看到它们作为属性。

Also : the foreign keys don't seem to get serialized on the client, we can only see them as attributes on the server side.

 

如何可以解决这个问题

 

谢谢

 

 

推荐答案

您好flouzje,

Hello flouzje,

感谢您的帖子!

请问这是什么类型的项目?我们是否在程序中进行序列化/反序列化工作?您能否发布错误发生的代码段?要查找错误发生的位置,可以在Visual Studio 2010中按F5开始调试,一旦出现错误,
,Visual Studio将自动在发生错误的行中断。

Could I ask what kind of project it is? Do we do serialization/deserialization work in program? Could you please post a code snippet where the error occurs? To find the where the error occurs, you could press F5 in Visual Studio 2010 to start debugging, once there is an error, Visual Studio will automaticaly break at the line where the error occurs.

我在asp.net论坛上发现了类似的问题,它发生在一个WCF项目中:

http://forums.asp.net/t/1537573.aspx

I found a similar issue in asp.net forums, it happened in a WCF project:
http://forums.asp.net/t/1537573.aspx

请提供更多信息来解决问题,你的信息非常重要。

祝你好运

Please provide us more information to trouble shoot the issue, you information is very important.
Best regards


这篇关于EF4 +中的序列化问题没有客户端的外键(序列化)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆