【问题标题】:LINQ insert to database by WCF Service from Silverlight appLINQ 从 Silverlight 应用程序通过 WCF 服务插入数据库
【发布时间】:2010-05-06 10:47:48
【问题描述】:

我在 Silverlight 应用程序的 WCF 服务中通过 LINQ 命令插入数据库时​​遇到问题。接收数据工作正常 - select 在 LINQ 中工作并显示来自数据库(sql server 2008)的数据。当我尝试插入数据时,出现错误:

System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound.
   at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
   at System.Net.Browser.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)
   --- End of inner exception stack trace ---
   at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)}

当我有一个错误的 ClientConfig/Web.config 文件时,它看起来是一样的。 请帮助...我需要插入一些数据:)

【问题讨论】:

  • 安装 Fiddler 以帮助客户端和服务器之间的通信。 :o)

标签: linq wcf silverlight service


【解决方案1】:

好的,感谢 Fiddler,我可以看到问题:

w GalleryService.position_order.set_asortment_id(Nullable`1 value) w C:\Monoceros\SilverGallery\GalleryService\MainDataSource.designer.cs:row 816

就像 LINQ 在插入 GUID 做相关表时出现问题一样。它将 GUID 插入到表顺序中。问题在于订单位置:( 救命!!!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-03
    • 2011-12-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多