0

I have tried several guides I find online, and nothing seems to work. I am trying to follow this guide, Setting up a new Silverlight 4 Project with WCF RIA Services, but when I try and add a Domain Services class to the RIA x.Web project, I get an error about an index dialoguie out of range etc. Google reveals this is maybe because VS can't find a connection string, although I have added one in App.config.

Then, if I try and add the DS class directly into my Silverlight host, bypassing teh RIA project, I get the same error, until I add an App.Config. After that, I can proceed an iota further, and I get to choose my DbContext and select a few entity classes to include in the DS class. But then I get an unspecified error.

Maybe something code-first specific? I find a NuGet package for CodeFirst EF and RIA, RIAServices.EntityFramework, but it doesn't support EF 4.3. I am going to try and duplicate my model in a dirty old edmx model and see.

Has anyone had any success doing any of this in VS 2012?

ProfK
  • 49,207
  • 121
  • 399
  • 775

1 Answers1

0

You should be adding connection strings to the Web.Config not an App.config

caa
  • 406
  • 1
  • 8
  • 16
  • The designer apparently looks in App.config, as the class library doesn't have a web.config. – ProfK Jul 20 '12 at 16:17
  • You also should copy the system.web etc entries from the app.config into your web project web.config (the one with the .aspx & .html files). This allows request to be routed to the domain service libraries. – Rus Jul 20 '12 at 19:04