I have a WCF Ria classlibrary (using EF) which is referenced in web project . Then a silverlight app is linked to the Web project and this works perfectly.
Now I am trying to reuse the WCF Ria classlibrary in a console application. I added a refernce to the WCF ria class library from console and try to do operations. But nothing is happening.
Am I doing something wrong? Is the WCF RIA supposed to consume only Silverlight clients?
Finally I figured it out. We can expose WCF ria using SOAP endpoints. In order to do this,
step 1
...............
<sectionGroup name="system.serviceModel">
<section name="domainServices" type="System.ServiceModel.DomainServices.Hosting.DomainServicesSection, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" allowDefinition="MachineToApplication" requirePermission="false" />
</sectionGroup>
....................
<system.serviceModel>
<domainServices>
<endpoints>
<add name="soap"
type="Microsoft.ServiceModel.DomainServices.Hosting.SoapXmlEndpointFactory,
Microsoft.ServiceModel.DomainServices.Hosting, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
...
</endpoints>
</domainServices>
...
</system.serviceModel>
........
Step2 - Add reference to the dll
Microsoft.ServiceModel.DomainServices.Hosting on the wcf ria services.This dll is a part of WCF RIA Services toolkit
Now the The service is ready to use . Usually the service will have a URL like this http:// nameofyourserver:port/ClientBin/NameOfYourSolution-Web-NameOfYourDomainService.svc
step 3 - Add service reference at the client side just like any other WCF service.
More details on how to use the WCF RIA exposed via SOAP in a non-silverlight app is here http://blogs.msdn.com/b/brada/archive/2010/03/29/silverlight-4-ria-services-ready-for-business-exposing-wcf-wsdl-services.aspx