Adding extra meta data to file-azure provider RRS feed

  • Question

  • I'm trying to add an extra field to the meta data of the azure-file sync provider (simple provider).  I believe I've done it correctly, but when the provider reads back and entry I've just added, it complains that "The simple provider requires that new items being reported contain all fields.".

    I'ved added to ItemMetaDataSchema the third item CUSTOM_FIELD_FILENAME as below.

    I've added to InsertItem as follows:

    keyAndUpdatedVersion = new ItemFieldDictionary
                            new ItemField(ItemFields.CUSTOM_FIELD_NAME, typeof (string), attrs.Name),
                            new ItemField(ItemFields.CUSTOM_FIELD_TIMESTAMP, typeof (ulong),
                                   (ulong) attrs.LastModifiedTime.ToBinary()),
                            new ItemField(ItemFields.CUSTOM_FIELD_FILENAME, typeof (string), dataRetriever.FileData.Name),

    I've added it to metadata as follows:

     internal static class ItemFields
        public const uint CUSTOM_FIELD_NAME = 1;
        public const uint CUSTOM_FIELD_TIMESTAMP = 2;
        public const uint CUSTOM_FIELD_FILENAME = 3;
     public override ItemMetadataSchema MetadataSchema
            CustomFieldDefinition[] customFields = new CustomFieldDefinition[3];
            customFields[0] = new CustomFieldDefinition(ItemFields.CUSTOM_FIELD_NAME, typeof(string), AzureBlobStore.MaxFileNameLength);
            customFields[1] = new CustomFieldDefinition(ItemFields.CUSTOM_FIELD_TIMESTAMP, typeof(ulong));
            customFields[2] = new CustomFieldDefinition(ItemFields.CUSTOM_FIELD_FILENAME, typeof(string), AzureBlobStore.MaxFileNameLength);
            IdentityRule[] identityRule = new IdentityRule[1];
            identityRule[0] = new IdentityRule(new uint[] { ItemFields.CUSTOM_FIELD_NAME });
            return new ItemMetadataSchema(customFields, identityRule);
    I've cleared the metadata on both the appdata and the base dir (both sides) and I still get this error.  Any ideas?


    Peter Kellner http://peterkellner.net Microsoft MVP • ASPInsider
    Sunday, September 19, 2010 6:02 AM