locked
AllowSynchronization not found RRS feed

  • Question

  •  

    I was looking at a recording from PDC 2008 (session TL08), regarding offline-enabled desktop applications using ADO.NET Data Services. In the demo, the presenter shows how synchronization can be added to an ADO.NET Data Service. I was very interested in this, and haven't played around much with ADO.NET Data Services yet; I decided to try to follow along. However, I'm running into a problem with AllowSynchronization.

     

    I've created a web application, an Entity Data Model, and then an ADO.NET Data Service. I then tried to add the following to the data service (exactly as was shown in the demo/video):

     

    Code Snippet

    public class DataService1 : DataService<dbEntities>

    {

    public static void InitializeService(IDataServiceConfiguration config)

    {

    config.SetEntitySetAccessRule("*", EntitySetRights.All);

    ((IDataServiceConfiguration)config).AllowSynchronization = true;

    }

    }

     

     

    I get an error on the AllowSynchronization, indicating 'System.Data.Services.IDataServiceConfiguration' does not contain a definition for 'AllowSynchronization' and no extension method 'AllowSynchronization' accepting a first argument of type 'System.Data.Services.IDataServiceConfiguration' could be found (are you missing a using directive or an assembly reference?) 

     

    I have VS 2008 SP1, .NET 3.5 SP1, and have installed the Sync Framework. I'm not sure what's going on, but would appreciate any insight on this.

     

    Thanks,

    Matt


     

     

     

    Wednesday, November 26, 2008 4:56 PM

Answers

  •  

    By the way, this is a feature is in V2 - not available in .net 3.5 SP1.

    Wednesday, November 26, 2008 10:52 PM
    Answerer

All replies

  •  

    The AllowSynchronization is under IDataServiceConfiguration2

     

    ((IDataServiceConfiguration2)config).AllowSynchronization = true;

     

    Regards,

     

    PQ

    Wednesday, November 26, 2008 10:48 PM
    Answerer
  •  

    By the way, this is a feature is in V2 - not available in .net 3.5 SP1.

    Wednesday, November 26, 2008 10:52 PM
    Answerer