实体框架 4 + WCF + Silverlight模型关联问题

发布于 2024-11-09 01:52:29 字数 1354 浏览 0 评论 0原文

我在通过 WCF 服务将实体对象发送到 Silverlight 应用程序时遇到问题。 我有一个 Vehicle 类,它工作正常,直到我将多对多关系分配给实体模型中的 Session 类。 在服务方面,我成功检索了我的车辆,但是在 Silverlight 应用程序中处理响应时,出现以下错误:

远程服务器返回错误:未找到

我尝试更改延迟加载选项,但它没有改变任何内容......知道吗?

编辑

我加入了异常的堆栈跟踪和实体模型的图片

   à System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
   à System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
   à System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
   à SFVehicleManagement.VehicleServiceReference.VehiclesManagementServiceClient.VehiclesManagementServiceClientChannel.EndGetAllVehicles(IAsyncResult result)
   à SFVehicleManagement.VehicleServiceReference.VehiclesManagementServiceClient.SFVehicleManagement.VehicleServiceReference.VehiclesManagementService.EndGetAllVehicles(IAsyncResult result)
   à SFVehicleManagement.VehicleServiceReference.VehiclesManagementServiceClient.OnEndGetAllVehicles(IAsyncResult result)
   à System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)

Entity model

编辑2

我应该添加,我创建了一个全新的项目,只有2个类具有多对多关联和一个非常简单的服务和silverlight应用程序,并得到相同的错误

I have a problem sending my entity objects through a WCF service to a Silverlight application.
I have a Vehicle class and it works fine until I assign a many to many relationship to a Session class in my entity model.
On the service side, I successfully retrieve my vehicles, but when when handling the response in the Silverlight app, I get the following error:

The remote server returned an error: Not Found

I tryed to change the lazy loading options but it didn't change anything...any idea?

EDIT

I join the stacktrace of the exception and a picture of my entity model

   à System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
   à System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
   à System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
   à SFVehicleManagement.VehicleServiceReference.VehiclesManagementServiceClient.VehiclesManagementServiceClientChannel.EndGetAllVehicles(IAsyncResult result)
   à SFVehicleManagement.VehicleServiceReference.VehiclesManagementServiceClient.SFVehicleManagement.VehicleServiceReference.VehiclesManagementService.EndGetAllVehicles(IAsyncResult result)
   à SFVehicleManagement.VehicleServiceReference.VehiclesManagementServiceClient.OnEndGetAllVehicles(IAsyncResult result)
   à System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)

Entity model

EDIT2

I should add, I created a brand new project with only 2 classes having a many-to-many association and a very simple service and silverlight app and get the same error

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文