InitializeService(DataServiceConfiguration config) method not called on Azure? RRS feed

  • Question

  • Hello there,

    I've got a problem deploying a WCF Data Service on Azure. This is what i did. I first tried the following InitializeService implementation using the DataServiceConfiguration object.

    public static void InitializeService(DataServiceConfiguration config)
       config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);

    This works great in the local Azure Development Fabric but not when it is deployed to the Azure cloud. When the root of the service is called on th Azure cloud i do get a response back from azure but the feed is empty.

    <service xml:base="http://blahblah.cloudapp.net/Api.svc/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app"> 

    There are no entities there, just like when you would call the service without setting any AccesRules for entities. That's why i think that some how InitializeService(DataServiceConfiguration config) is never called when it is deployed to Azure.


    Then i tried changing the method signature to use the IDataServiceConfiguration interface instead of DataServiceConfiguration and now it runs fine in both local Development Fabric as well as in the Azure Cloud environment. 


    public static void InitializeService(IDataServiceConfiguration config)
       config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);


    But the IDataServiceConfiguration interface doesn't support the same methods that DataServiceConfiguration supports. Such as SetEntitySetPageSize which we would like to use to configure the service.


    Question is...what needs to be done to use the InitializeService(DataServiceConfiguration config) method on Azure Cloud?









    Monday, June 14, 2010 2:43 PM


All replies