locked
Error using RIA service in Lightswitch RRS feed

  • Question

  • I am trying to do a basic use of a RIA service with LightSwitch.

    I am using VS 2010 Premium, I have a solution that has a RIA and a SIlverlight sample pagew and that works correctly and fills a grid with rows of data.

    I added a LightSwitch Project and gave it a ref to the Web with the service.  the designer tools see the methods and created a screen.

    at runtime an Exception is throws and it is hard to catch it to copy here but is says that the Inner Exception is that the Named COnnection can not be found in the configuration or is not intended to be used with the EntityClient Provider or is not valid.

     

    the RIA is a DOmain Service that is generated from EF 4.0 on a SQL 2008 Database user instance that is attached and working with a normal silverlight client.

    could this be a sign that i need to add a cross domain xml file to the RIA ?

     

    Friday, August 20, 2010 1:38 AM

Answers

All replies

  • It looks like the web app project is not running so the lightwitch app can not connect to it.

    Friday, August 20, 2010 1:49 AM
  • Are these both in the same instance of Visual Studio? If so, then I don't think it will work. While you can have a LightSwitch project and another project in the same solution, you can only run one at a time.

     


    Steve Hoag Microsoft aka the V-Bee
    Friday, August 20, 2010 2:17 AM
    Moderator
  • if that is true then it needs to be documented.

    also i think that while for the non-pro some of the lightswitch settings may be fine for the pro we should be able to open up more of the options and adjust things.

    for example a std silverlight project has a web that the sl app deploys to and debugs with.  we should be able to do the same with lightswitch. run it from the same kind of web that can host any other silverlight app.

     

    also the video on channel9 "LightSwitch beyond the basics" with Beth Massi and Joe Binder.   At about 39 minutes seems to show a ria domain web service added to a lightswitch project and running together.... so i think something needs to be clarified as to what they are doing and what is running....

    what i saw was that he did not use a database but i am. aside from that it looks like i am trying to do what Joe did a demo of.

    here is a link to the video:

    http://channel9.msdn.com/posts/funkyonex/Visual-Studio-LightSwitch-Beyond-the-Basics/

     

    Friday, August 20, 2010 3:29 AM
  • Hi,

    We do support having a RIA Service project and a LS project in the same solution.   I think the issue you are having is that the RIA Service project has a web.config that is different from the LightSwitch web.config.  You need to manually add appropriate connection information to your LightSwitch web.config.   I've provided instructions on how to do this here: http://social.msdn.microsoft.com/Forums/en-US/lightswitchgeneral/thread/6bc64d70-ac9c-404f-b7cd-5d82cfcc5cfd

    We are hoping to improve this experience in our next Beta.

    Thanks!

    Friday, August 20, 2010 6:16 PM