Contents tagged with WCF Ria Services
-
MVVM, Data Channel, MEF, WCF RIA Services and ViewModel Locator – Silverlight 4.0
In the Aspen project I decided to use a ViewModel locator to find the ViewModel a View should use, I also use MEF for composition of parts. In this post I’m going to write about the MVVM implementation we use in the Aspen project, but first about the Data Channel used in Aspen.
-
The Aspen progress – Silverlight 4, Net 4, WCF RIA Services ref. project
It was a while since I wrote a blog post, the reason are many, first preparation for the SDC2010 conference where I talked about WCF RIA Services, then 2 sessions at Microsoft TechDays 2010 where I talked about Web Form vs MVC and building business application with Silverlight 4, MVVM and WCF RIA Services.. and then bought a new car and also have bean on the Microsoft Visual Studio 2010 Ultimate tour and one week vacation in Italy. So a busy time. This blog post will only mention some of the latest updates we have made to the project.
-
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 SideYou 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.DomainServicesTo:System.ServiceModel.DomainServices.ServerLocated 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.EntityFrameworkThe LinqToEntitesDomainService is located in the following namespace: System.ServiceModel.DomainServices.EntityFrameworkClient-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 -
WCF RIA Services Silverlight Business Application – Using ASP.NET SiteMap for Navigation
Note: This blog post examples is based on the WCF RIA Services PDC Beta and WCF RIA Services VS 2010 Preview, changes to the framework may happen before it hits RTM.
This blog post will be about using the ASP.NET SiteMap together with WCF RIA Services and the Navigation feature added to Silverlight. I assume you are familiar to how the Navigation feature will work when reading this blog post, even if you don’t know you may find this blog post interesting. -
WCF RIA Services and Audit – Historical changes
Note: The examples in this blog post is based on the WCF RIA Services PDC Beta and VS2010 Beta Preview, and changes to RIA Services can be done until it hits RTM.
-
Aspen – part 7 of X – Entity Validations
Dag König and I had a meeting today about the Aspen project. We talked most of the time about validations and how we should implement it. I decided to post about the current decision made.
-
Aspen – part 6 of X – Reusing ObjectContex among Repositories during a DomainSerivce operation.
(I had to shorten the title down a bit ;))
-
Aspen – A sample app using Silverlight 4 and .Net 4.0 – part 5 of X – New Repository implementation
This will be quite small blog post but the time is running out and I have to go to bed. But I wanted to let you know what I’m working on at the moment in the “Aspen” project.
-
Aspen – A sample app using Silverlight 4 and .Net 4.0 – part 4 of X – DomainService, using DTO and Unity
Note: The code in this post is based on the VS 2010 Beta 2, and changes can be made until it hits RTM.
-
Aspen – A sample app using Silverlight 4 and .Net 4.0 – part 2 of X – MEF and EF 4 code-only
Note: The code examples in this blog post will be based on technical previews and betas of .Net 4.0 and VS2010. So changes can be made before it hits RTM.