How to Gracefully Handle Deleted Metadata with Knowledge Provider RRS feed

  • Question

  • The situation I am trying to handle is as follows:

    I have a source file provider that has one file in it.  I successfully sync that to azure using a knowledge azure provider I have written.

    I then delete the meta data.

    Now, when my provider first runs, it calls a method "UpdateMetadataStoreWithLocalChanges".  This method creates metadata for all items that currently do not have metadata as well as marking those that are newer than the metadata.

    Since the metadata was empty before starting, the above find that all files are new and sets a new version to them.  Then, when SaveItemChange is called by the sync engine, a saveChangeAction of create is passed in when this item gets passed in from the file sync provider and not an update (or do nothing).  This causes the item to be created (and since it is already there, it errors).

    What I want is to figure out a place to check to see if the file exists on azure, if so, assign the metadata to that file from the fileprovider and go on without re-uploading the file.

    Thanks for any help on this.

    Peter Kellner http://peterkellner.net Microsoft MVP • ASPInsider
    Wednesday, December 1, 2010 6:26 AM