WCF Service Returns Load Operation failed for query 'GetProducts'. The remote server returned an error: NotFound
-
Saturday, January 09, 2010 5:38 PM
I am trying to work through the walkthrough on creating a RIA Services Class Library available from here; 'http://msdn.microsoft.com/en-us/library/ee707351(VS.91).aspxHowever when I run I get the error above; I wonder if there is a problem with the Web.Config file (given this is the one bit I had to edit myself ;))This is as follows;<?xml version="1.0"?> <configuration> <connectionStrings> <add name="AdventureWorksEntities" connectionString="metadata=res://*/AdventureWorksModel.csdl|res://*/AdventureWorksModel.ssdl|res://*/AdventureWorksModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=PAUL-BEAST\SQLEXPRESS;Initial Catalog=AdventureWorks;Integrated Security=True;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" /> </connectionStrings> <system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" /> </system.serviceModel> <system.web> <compilation debug="true" targetFramework="4.0" /> <httpModules> <add name="DomainServiceModule" type="System.Web.Ria.Services.DomainServiceHttpModule, System.Web.Ria, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </httpModules> </system.web> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> </configuration>and the code which makes the call to the service that is failing is as follows;void MainPage_Loaded(object sender, RoutedEventArgs e) { ProductsDomainContext ctx = new ProductsDomainContext(); try { ProductsGrid.ItemsSource = ctx.Products; ctx.Load(ctx.GetProductsQuery(), loadOperation => { if (loadOperation.HasError) { MessageBox.Show(loadOperation.Error.Message); loadOperation.MarkErrorAsHandled(); } } , null); } catch (Exception ex) { throw ex; } }Thanks in advance- Moved by Esther FanMicrosoft Employee Friday, October 15, 2010 10:27 PM (From:Modeling and Tools)
All Replies
-
Tuesday, February 16, 2010 10:13 PMCould you please give information about your environment ? VS version, dotnet framework version and RIA ? more over if you are using VS2008 SP1 then RIA beta only is available and well available for VS2010.
--- Hope this helps. Ananth Ramasamy Meenachi https://www.msarm.com -
Monday, June 07, 2010 10:29 AM
Could you please give information about your environment ? VS version, dotnet framework version and RIA ? more over if you are using VS2008 SP1 then RIA beta only is available and well available for VS2010.
--- Hope this helps. Ananth Ramasamy Meenachi https://www.msarm.com
Maybe it's the settings at the server side? -
Tuesday, June 29, 2010 3:04 PM
I have the same problem. Using VS 2010, .NET Version 4.0 and WCF RIA Services Version 1.0.
I initially followed the steps with my own database. When that didn't work I downloaded the AdevntureWorksLT database and got exactly the same problem......
However if I build a Silverlight Business Application to display the Products table it works just fine.
- Edited by lennieh1 Tuesday, June 29, 2010 3:36 PM more info
-
Thursday, October 14, 2010 3:07 PM
In my case solution was to set "Copy Local" Property of following assemblies from WebSite's References Folder to "True":
System.ComponentModel.DataAnnotationsSystem.ServiceModel.DomainServices.EntityFramework
System.ServiceModel.DomainServices.Hosting
System.ServiceModel.DomainServices.Hosting.OData
System.ServiceModel.DomainServices.Server
System.Web.ApplicationServices System.Web
System.Web.Extensions System.Web.Mobile
System.Web.Services
If all is correct after next rebuilding those assemblies will be copied to bin folder of your project. What's good any handy configuration of IIS 7 I didn't perform.