Orchard, Silverlight and RIA Services

Topics: Customizing Orchard, Writing modules
Oct 24, 2011 at 3:11 PM

Hello there,

I'm working in a very difficult task, my problem is I want to build a Silverlight App and an Orchard module that hosts that SL app which fetches data from the host, the module, by RIA Services. So I build the module and added a SL Application to my sln. and point it to the module to read RIA from it. Then in the module project properties I pointed to the SL app to be deployed in it, and added the needed RIA service.

The problem now is the SL app can't read data from the module coz the RIA url is not right or the RIA service is not running or can't be accessed :(

Any IDEA :)

Oct 24, 2011 at 3:23 PM

UPDATE:

After debugging, The SL app is returning the err: "Invoke operation 'XXXX' failed. The remote server returned an error: NotFound.".

Oct 24, 2011 at 3:35 PM

UPDATE 2:

When I added the RIA service to the module, the DomainService class, via wizards, it changes in the module web.config as follows [The old original values replaced with dots]:

<?xml version="1.0"?>
<configuration>

  ....

  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
      <add name="DomainServiceModule" preCondition="managedHandler"
        type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </modules>
    <validation validateIntegratedModeConfiguration="false" />
  </system.webServer>
  ....

  <system.web>
    <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>

  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
      multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
</configuration>

Nov 1, 2011 at 3:29 PM

CLOSE:

I build the service from scratch without using any wizards as said here: http://weblogs.asp.net/bleroy/archive/2011/04/20/orchard-1-1-what-s-in-it-for-developers.aspx

And bind it to the Silverlight app by 'Add Service Reference' and point to the prev. service>

 

Still think there will be a problem when deploying coz of the static svc link, it's in the format of a content file like images:

http://localhost:30320/OrchardLocal/modules/[HostingModule]/WCFServices/[ServiceFileName].svc