locked
Silverlight 4 Service Reference doesn't acknowledge DataServiceProtocolVersion.V3 RRS feed

  • Question

  • Hi,

    I can't get Silverlight 4 to reference the correct assembly for June CTP.

    In the web project I have references to:

    C:\Program Files (x86)\Microsoft Data Services June 2011 CTP\bin\.NETFramework\Microsoft.Data.Services.dll

    C:\Program Files (x86)\Microsoft Data Services June 2011 CTP\bin\.NETFramework\Microsoft.Data.Services.Client.dll

     

    The WCF Data Service has "config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3;" set correctly.

    The markup may be the problem since it initialiy created with V2:

    Factory="System.Data.Services.DataServiceHostFactory, System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

    is that correct for the June CTP V3?

     

    I found that the markup needed to be changed for the March CTP to:

    Factory="System.Data.Services.DataServiceHostFactory, Microsoft.Data.Services.Delta, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

    but this does not work with the June CTP.

     

    In SL4 I have reference to:

    C:\Program Files (x86)\Microsoft Data Services June 2011 CTP\bin\Silverlight\Microsoft.Data.Services.Client.dll

     

    When I add the service reference, it automatically keeps adding a reference to:

    C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Data.Services.Client.dll

    which I then remove as it creates conflicts.

     

    I need to set "_context.AddAndUpdateResponsePreference = DataServiceResponsePreference.IncludeContent;" which is only available in V3.

    Checking the _context when it is initialized keeps telling me that the Protocol Version is V2

    thus when I try to save my data I get a message saying:

    "The request requires that version 3.0 of the protocol be used, but the MaxProtocolVersion of the data service context is set to V2. Set the MaxProtocolVersion to the higher version, and then retry the operation."

     

    Does anyone have a solution for this?

     

    Zack

    Thursday, September 8, 2011 12:22 AM

All replies