I am new to Silverlight (and .NET as well, for the most part) and am working on creating a Silverlight business application. I followed the tutorial at http://msdn.microsoft.com/en-us/library/ee796239%28v=vs.91%29.aspx and everything seems to work fine except for one problem: not all tables/data is making its way over.
I am using Windows XP SP3, Microsoft SQL server 2008 and Visual Studio 2010 for reference.
I created the app in VS as the default template for a Silverlight Business Application. I then created the SQL connection to my database. Then, following the tutorial, I created the Entity classes and then the Domain Service, just as the tutorial says to.
Alright, so here is what happens: I dragged and dropped a data grid onto a XAML form. The first one worked just fine and displays the data rows correctly. The second one does not, instead it throws the following error:
System.ServiceModel.DomainServices.Client.DomainOperationException: Load operation failed for query 'GetMyData'. The remote server returned an error: NotFound. ---> System.ServiceModel.CommunicationException: The remote server returned an error: NotFound. --> 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) ...
This error appears as a pop-up from the web page when I try to navigate to it.
I have stepped through the Service.cs class on the GetMyData function and placed a watch on the data to be returned. It shows that there is data, and I can even see the individual line items it is supposedly returning, so I just can't see the error anywhere.
Why does this work for some tables and not others? Has anybody else seen this error? I have seen a couple of pages that mention adding httpbindings and service tags to the web.config, but following their examples didn't work either. As a matter of fact, when I do add them it makes the entire app not compile.
Is there a piece of configuration that I am missing somewhere?