Debug a RIA Service from Silverlight project

If you need to debug a Silverlight project that references a RIA Service project that host the Entity Framework mapping with the Data Access Layer logic, you need to insert inside the App.config file in the RIA Service this xml node

<system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
    <httpModules>
      <add name="DomainServiceModule" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </httpModules>
</system.web>
Advertisements

Setting up a new SL project with RIA Service

A very useful guide that explain Wcf RIA Service and Silverlight 4 project and their connection.

http://geekswithblogs.net/kgrossnicklaus/archive/2011/01/30/setting-up-a-new-silverlight-4-project-with-wcf-ria.aspx