LINQ insert to database by WCF Service from Silverlight app
I have a problem during insert to database by LINQ command in WCF Service from Silverlight application. Receiving data works fine - select works in LINQ and shows data from database(sql server 2008). When i try to insert data, the Error ocures:
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 ---
a开发者_运维问答t 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)}
It looks the same, when i had a wrong ClientConfig/Web.config file. Please Help...I need to insert some data:)
OK thanks to Fiddler i can see the problem:
w GalleryService.position_order.set_asortment_id(Nullable`1 value) w C:\Monoceros\SilverGallery\GalleryService\MainDataSource.designer.cs:row 816
It seam like LINQ has a problem with inserting GUIDs do related tables. It inserted GUID to table order. The problem is with order positions:( HELP!!!
精彩评论