locked
It seems FileSyncProvider requires a value for AbsoluteSourceFilePath even though the docs say it is optional. How can I use with remote data? RRS feed

  • Question

  • I am using the FileSyncProvider to synchronize two remote files through WCF.  When the synchronize runs, I pass a serializable IFileDataRetriever to the remote server for the source. The AbsoluteSourceFilePath property throws a NotImplementedException and the FileStream property contains the data in the file. During the synchronize, I get the ApplyingChange event for my file (change type = update), but then I get the SkippedChange event with the exception being the NotImplementedException from the IFileDataRetriever and the reason is WriteError. 

    Once I get the ApplyingChange event I put a breakpoint on the AbsoluteSourceFilePath property and FileStream property of my FileDataRetriever.  I see that after it tries to get the AbsoluteSourceFilePath it then tries to get the FileStream, which is successful but the next thing is the SkippedChange event.  If the AbsoluteSourceFilePath is required, how can I set it for a remote file that is not accessible?

    Saturday, July 10, 2010 9:18 PM

All replies

  • Hi,

    Are you using Sync Framework 2.0?  This issue you mention existed in 1.0 but should be fixed in 2.0, that is you can throw a NotImplementedException from AbsoluteSourceFilePath.

    -Jesse

    Monday, July 12, 2010 11:22 PM
  • I am getting similar problems when using Sync Framework 2.0. Unfortunately because the Sync Framework source code isn't available, all I can see is that I call Microsoft.Synchronization.SyncOrchestrator.Synchronize(), then [ExternalCode] runs, then I get a NotImplementedException in the AbsoluteSourceFilePath getter of my implementation of IFileDataRetriever. Strangely this doesn't seem to bother the operation of SyncOrchestrator and no errors are returned so it may be handling it internally, but it's not very nice.

    Tuesday, July 20, 2010 9:01 AM
  • This thread contains more detail:

    http://social.microsoft.com/Forums/en-US/synctechnicaldiscussion/thread/1b37437c-7644-4723-87a6-835f3044b9c2

    I guess the behaviour I'm seeing is correct?

    Tuesday, July 20, 2010 9:25 AM