0
votes

Good day!

I'm developing a Silverlight Solution with a lot of projects that uses RIA Services. Each silverlight project have Silverlight + Own Ria Services project. I want to make only one RIA services project and all silverlight project consume it.

The problem is when I set the "WCF RIA Services Link" to the new RIA Services, the Silverlight project works ok, my ViewModel class works ok, but, when I'm running, the application give me the error: "Load operation failed for query 'GetList'. The remote server returned an error: NotFound."

When I test on the browse http://localhost/Project-Web-Services-Patrimonio-ClassService.svc runs ok.

How can i do to make it ok?

[]'s Tiago Schäffer

1

1 Answers

0
votes

I think you will find you are missing the RIA services web library config settings in your web app.

Taken from my answer here. Key notes in bold.

Use the RIA services project option to create your service library. That creates 2 projects that are bound together (for code gen of the proxy objects). Both are effectively just libs (1 Silverlight and 1 .Net)

Link any RIA services client library to you Silverlight app. Then link the .web RIA project to your hosting web app (for the standard RIA use). You can also add the .web library to your Wcf service as a .Net lib (not consume it as a service).

If you did not create your main Silverlight project as a RIA services project you will need to move the settings across from the app.config file to your web.config file. If you already have the service support settings you only need to copy the db connection string across. The db connection string only should be needed for you Wcf project.

You should then be able to either use the server-side RIA calls (don't forget to add your own submitchanges calls as RIA does that behind the scenes once per batch of updates), or just use the data layer (EF etc) directly.