I configured my Windows 7 machine(machine 2) for offline file synchronization to synchronize content from network shares.
I created a share(testshare) on machine 1(it is windows 7 as well) and have one structured storage file(name: a.ext) in that share. I connected to the share(via mapped network drive) from machine 2, right click on the share (say V: drive) and set to "Always available offline". The file is synced and I can see the file a.ext in the Sync Center.
In my application, I programmatically do the following:
a)I access this network file a.ext on share, Open the root storage(LPSTORAGE) for write access and then make changes to the root storage and then commit to disk.
b)Created a new structured storage file(b.ext) in the %temp% folder on my machine 2. Open the root storage for write access, and then copied the storage content using api IStorage::CopyTo() (from a.ext to b.ext) and then committed the storage to disk. This step is purely to compress the file on disk.
c)Now, I deleted file a.ext via call DeleteFile() api and then used MoveFile() api to move the b.ext file to a.ext file so that the compressed file is saved to disk.
The issue is:Sometimes I see the a.ext file at the shared network location updating immediately and sometimes the file a.ext is missing but I can see the file when I click on View my offline files from Sync center. The shared network file SHOULD always update immediately when the network is UP/online.
I think this would be a Sync configuration problem, instead of a dev issue.
And I think the following configuration explanation will give your some clues:
Thank Mike for the response. I read all the links provided. Are you suggesting that I need to "Configure Background Sync" feature for the problem to get resolved, currently it is not enabled on my machine? Also, I am not on a slow network.
In addition, I am wondering if the step c) done by my application is throwing off the sync process as the file on network is deleted after it was sync'ed and the system thinks that there is a conflict due to this and does not sync.
Since my not rich experience on this issue aspect area, I just find pages and read, I thought maybe those 3 links can give you helps, so I post it to you and told you what I thought, and have a try.
But I think I cannot research deeply any more, I will try to involve others senior engineer to see if they can help you on this aspect issue.
Thanks for your patient.
From a support perspective this is really beyond what we can do here in the forums. If you cannot determine your answer here or on your own, consider opening a support case with us. Visit this link to see the various support options that are available to better meet your needs: http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone.
Trevor Hancock (Microsoft)
Please remember to "Mark As Answer" the replies that help.
- Proposed as answer by Trevor HancockMicrosoft employee, Owner Thursday, August 09, 2012 7:03 PM