实体框架 4 + WCF + Silverlight模型关联问题
我在通过 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)
编辑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)
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论