Some steps for moving WCF RIA Services Preveiw to the RC version.

I moved the Aspen project from the WCF RIA Services VS2010 Preview to the RC version. Maybe some of you will move your Preview version to the RC, so I wrote down some steps..
 
 
Server Side
 
You can start with replacing the Web.Config, because I don’t know how your config looks like, I just copy a clean PDC preview config and paste it here and the new one for the RC
 

Old one:
 
 
<?xml version="1.0"?>
<configuration>

    <system.web>
        <httpModules>
            <add name="DomainServiceModule" type="System.Web.Ria.Services.DomainServiceHttpModule, System.Web.Ria, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        </httpModules>
        <compilation debug="true" targetFramework="4.0" />
    </system.web>
    <system.webServer>
        <modules runAllManagedModulesForAllRequests="true">
            <add name="DomainServiceModule" preCondition="managedHandler"
                type="System.Web.Ria.Services.DomainServiceHttpModule, System.Web.Ria, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        </modules>
        <validation validateIntegratedModeConfiguration="false" />
    </system.webServer>
 
    <system.serviceModel>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    </system.serviceModel>
</configuration>
 
 
New one:
 
 

<configuration>
  <configSections>
    <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>
  </configSections>
 
  <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>
    <compilation debug="true" targetFramework="4.0" />
 
  </system.web>
 
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <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>
  </system.webServer>
 
  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
 
 
You can see all the changes by comparing both of them. I just made a simple copy and paste of the whole file in the Aspen project.
On the server-side the following assembly references need to be replaced:
 
Replace:
System.Web.DomainServices
 
To:
System.ServiceModel.DomainServices.Server
 
Located in the following folder (depends where your SDK is  installed):
C:\Program Files\Microsoft SDKs\RIA Services\v1.0\Libraries\Server

Then replace the System.Web.DomainServices namespace to System.ServiceModel.DomainServices.Server

Replace the following assembly references:

System.Web.Ria
(and System.Web.Ria.Services)

To:

System.ServiceModel.DomainServices.Hosting
System.ServiceModel.DomainServices.Server

The EnableClientAttribute is located in the Hosting assembly now.

Then replace the System.Web.Ria namespace to System.ServiceModel.DomainServices.Hosting.

For the Invoke-, Insert,  IgnoreAttribute etc, replace the System.Web.Ria.Services namespace with System.ServiceModel.DomainServices.Server.
 
 
Note: I don’t use LinqToEntitesDomainService, but I guess if you do, then you need on the server side add a reference to the assembly:
 
System.ServiceModel.DomainServices.EntityFramework
 
The LinqToEntitesDomainService is located in the following namespace: System.ServiceModel.DomainServices.EntityFramework
 
 
 
Client-Side:
 
Replace:

System.Web.Ria

To:

System.ServiceModel.DomainServices.Client
System.ServiceModel.DomainServices.Client.Web

Located in the folder (depends where your SDK is installed):

C:\Program Files\Microsoft SDKs\RIA Services\v1.0\Libraries\Silverlight

Add a reference to the following assembly:

System.ServiceModel.Web.Extensions

(This assembly is not in the SDK folder; use the .NET Tab in the Add Ref. dialog)
Remove the old “Generated_Code” folder and rebuild your solution.


If you want to know when I publish a new blog post, you can follow me on twitter: http://www.twitter.com/fredrikn
 

5 Comments

  • Breaking Changes from Beta(PDC 09) to RC(MIX 10):
    http://code.msdn.microsoft.com/RiaServices/Release/ProjectReleases.aspx?ReleaseId=3570

    // Conny

  • This was really great! Thanks! :)

  • Was going through the pain here, you're post helpeed me out! Thanx :)

  • Hello Frederick

    I have got a query regarding M Lang. Since ASPEN uses Entity Framework 4 code only, do you use M -Oslo file to develop few models. Please let us know.

    regards
    Dhinesh Kumar

  • I followed the steps above and got a strange warning below. I have .net 4 framework & Silverlight toolkit installed.

    The element 'system.serviceModel' has invalid child element 'domainServices'. List of possible elements expected: 'behaviors, bindings, client, comContracts, commonBehaviors, diagnostics, serviceHostingEnvironment, extensions, protocolMapping, services, standardEndpoints, tracking, routing'.

Comments have been disabled for this content.