The Storage Team Blog about file services and storage features in Windows and Windows Server.
Hi, I'm Navjot Virk, program manager for Offline Files in Windows Vista, and I'll be blogging a multi-part series about the new features in Offline Files.
Offline Files is a feature of Windows Vista that enables access to files on an SMB server even when the client is not connected to the server. Offline Files was first introduced in Windows 2000 and then revised in Windows XP. Offline Files in Windows Vista has been completely redesigned based on the feedback we received from our customers. Offline Files in Windows Vista has many new features, such as seamless transitions and better synchronization, both of which I'll describe below.
Seamless TransitionsOffline files has two main modes of operation--online mode and offline mode. The user is working in online mode when they are connected to the server and most file requests are sent to the server. The user is working in offline mode when they are not connected to the server and all file requests are satisfied from the Offline Files cache.
Offline Files in Windows Vista offers seamless (no user intervention required) transition from online to offline mode and from offline mode to online mode.
In Windows XP, the transition from online to offline mode was seamless. However, the transition from offline to online mode was very disruptive. The user would be working offline and suddenly Offline Files would detect that the server is available for reconnection and pop up a balloon to notify the user. At that point the user would need to close all open applications, and then initiate synchronization, and only then would he be transitioned back to online mode. This was very disruptive.
In Windows Vista, the transition from online mode to offline mode is seamless just like in Windows XP. However, in Windows Vista the transition from offline mode to online mode is also seamless and non-disruptive. When Offline Files detects that the share is available for reconnection, all open handles are recreated on the server and the user is immediately transitioned to online mode. The user can now see the server namespace and open files online. Also, Offline Files will automatically initiate synchronization in the background to push all offline changes to the server and pull in any changes made on the server while the client was offline. If a file happens to be in conflict, then just that one file will continue to stay offline (all requests for that file will be satisfied from the cache). The user is notified of the conflict by the sync center system tray icon. The user can resolve this conflict by going to the sync center whenever they are ready. Until the user resolves the conflict, this file will continue to be offline and the user can keep working with his version.
Another big difference from Offline Files in Windows XP is that in Windows Vista the transitions happen at the share level. In Windows XP, the transitions happened at the server level. In other words, in Windows XP if you had a network error or if the share on the server was down (maybe due to maintenance), then the client would be transitioned offline against the entire server even though other shares on the same server were available. This gets much worse against a domain-based DFS path, such as \\microsoft.com\public\users. In Windows XP, if one server or share in the domain goes down then the entire domain-based namespace is transitioned offline. While offline the user can only access that part of the domain-based namespace that has been cached by Offline Files.
In Windows Vista, this transition happens at the share level. In other words, only that part of the namespace that is backed by the share that is down is transitioned offline. Other shares on the same server are still available online. In case of domain-based DFS, only the part of the logical namespace that is backed by the share that is down is transitioned offline. The rest of the domain-based namespace continues to be available online.
Offline Files in Windows Vista also offers a user interface to force a share to transition to offline mode even when the client is connected to the server. Using Windows Explorer, the user can browse to the share or a directory inside the share. The command bar of Windows Explorer in Windows Vista has a “Work Offline” button that the user can click to force the share to transition to offline mode. The button then changes to “Work Online.” The user can click the “Work Online” button to transition back to online mode.
Better SynchronizationOffline Files in Windows Vista offer much improved synchronization. The improvements to synchronization are two-fold. First, Offline Files in Windows Vista uses a new faster algorithm to determine what files or directories are different between the client and the server. Second, Offline Files in Windows Vista uses “Bitmap Differential Transfer” when synchronizing changes from the client to the server. Bitmap Differential Transfer is essentially a mechanism to keep track of what blocks of file were modified when offline. When synchronizing changes from the client to the server, Offline Files in Windows Vista sends only those blocks of the file that were modified offline. In Windows XP, Offline Files always copies the entire file even if only a small part of the file was modified.
Bitmap Differential Transfer makes the synchronization in Windows Vista more efficient and enables Offline Files to cache large files like .pst and .mdb files. Because Offline Files in Windows XP could not synchronize large files efficiently, files like .pst and .mdb were by default not cached. Offline Files in Windows Vista can cache all file types and by default no file types are excluded.
Please note that the Bitmap Differential Transfer in only used when pushing changes from the client to the server. This optimization is not used when pulling changes from the server to the client. If a file is modified on the server when offline, Offline Files in Windows Vista will still copy the whole file down to the client during synchronization. The impact of this will be more pronounced for those users who modify the same files from multiple client computers.
Also, note that Bitmap Differential Transfer only works for pre-existing files that are modified in place. Bitmap Differential Transfer will not happen for files that are created while offline. Some applications, like Microsoft Word, do not modify the file in place. These applications create a new temporary file with the changes and later rename the temporary file to the original file. Bitmap Differential Transfer will not happen for such files.
All improvements to synchronization including Bitmap Differential Transfer will be available against any SMB server, for example, Windows 2000, Windows 2003, Windows R2, NetAPP server, etc.
Offline Files in Windows Vista also provides per-user synchronization. All synchronization operations only synchronize files that the currently logged on user has access to. Offline Files in Windows XP would always try to synchronize all files in the cache including files that where cached by other users. The logged on user would see synchronization failures for the files that he did not have access to. In Windows Vista, the user will only synchronize his files (files that he has access to) therefore he will never see errors for files that belong to some other users (files that he does not have access to).
Also, synchronization of Offline Files in Windows Vista can be scripted using WMI.
Jim Allchin blogs about changes to offline files in Vista and includes the great titbit of information that now, finally, the pc will only sync the files belonging to the user that is logging off so that the access denied...
This is all fantastic, but has there been any work on the CSCCMD such as addressing what appears to be the number 1 oversight - no command line to force a syncronisation?
This is absolutely critical in order to be able to automate a few things - eg for one client application, one user is virtually always out of the office and works with offline folders constatntly. But for him (using XP), he has to manually establish a VPN connection, then go and right click on the folder and syncronise, and then close the VPN connection after the sync has finished. This is a major pain to do manually. But this would be a really simple batch file if CSCCMD actually had a full range of options.
The new offlines files looks to be very promising; however, I am experiencing an unusual problem that I hope you might be able to help me diagnose. I am making changes against a Windows Server file system that has been "made available offline". Every file I changed fails to synchronize with the error "Access is denied." What permissions does the offline files engine require on the server to function properly? I am not experiencing this problem on XP.
Edan, check to see if oplocks have been disabled on the server. See article http://support.microsoft.com/kb/296264/en-us for details.
Greg, I will follow up on your question.
I assume you're discussing possible updates to the CSCCMD utility to be used on Windows XP clients. As you may know, CSCCMD is not supported for Offline Files on Vista. On Vista that functionality has been replaced by a WMI provider to enable scripting of a subset of the Offline Files COM API. If you're interested in that see the classes in CIM Studio prefixed with the name Win32_OfflineFilesXxxxxxx. For synchronization you would use Win32_OfflineFilesCache.Synchronize. We're working on the documentation for MSDN. The documentation for the COM version is already present on MSDN. Just search for IOfflineFilesCache.
Now back to CSCCMD. There will be no further updates to CSCCMD. The desire for sync capability in that utility is well understood but the fact is that the the architecture of the Offline Files sync engine in Windows XP does not support adding that to a separate EXE such as CSCCMD. Even if this were possible, the current code is designed to work in an interactive GUI environment, not a scripted environment.
Note that there is a way to initiate a script of an item in the Offline Files cache on a Win2000 or WinXP system using the shell's object model. Using that model you can bind to the file or folder item then invoke the "sync" verb. That will perform the very same code that runs when the user right-clicks on an item in explorer and selects the "Synchronize" menu item. The one issue is that the sync progress UI will appear as will the conflict resolution UI should any sync conflicts be detected. Again, this is merely replicating what happens when the user clicks the menu item in explorer.
I hope this has helped explain the situation. We have received requests for sync capabilities in CSCCMD in the past but that is simply not possible given the architecture of the feature in Windows 2000 and Windows XP.
Thanks for the suggestion. Optimistic locking is enabled on both the client and server. And, permissions are right.
Could anything else be causing "Access Is Denied" when making changes offline files directories on my Vista x64 client?
For anyone else experieincing the "Access is denied." problem using offline files in Vista, be sure to adjust your server's share to provide Full Control for all users who need to write to offline files. This was not necessary under Windows XP and may be a bug in Vista. More can be found at http://help.wugnet.com/vista/Offline-Files-Access-Denied-error-ftopict42292.html
I have a crisis and was wondering if anyone can help. I use the offline files feature in XP Pro and it works fine. I'm in India on business, working with a partner. Their IP person connected me to their network so I could print somethings by changing the domain name in My Computer/Properties/Computer name, and in so doing "disconnected" me from my home network. I am now no longer able to access my on-line files,though I can "see" them in Windows Explorer. My IT people in the US say that they cannot reconnect me unless I am physically connected to the home network. While they can send me my week old files off the network, I have an enormous amount of work which I've done in the last week I need access to. Can anyone help? I'm on line and also at email@example.com
I have loaded 2 laptops with vista enterprise, they have been added into a SBS2003 domain, all the patches etc were loaded. The client wanted to make documents available offline from their home dir. So Simple right !! click the network folder and say make available offline and the files sync across to the laptop. so now if all is ok and its working fine you can either click and say work offline or disconnect and work offline ? Naada the files all say they are unavailable ..... vista is cr...p.. and so are ofline files.... plse respond to firstname.lastname@example.org
The seamless approach seems to be causing me a lot of problems. I have been using Offline files in XP and never encountered the following:
Being online I open a file on the network drive, my collegues are able to open the same file (all of them on XP) without any warning of it being locked /opened by me.
After saving the file I suddenly realise that soemone has been editing the network file, there is sync conflict and although being online I have edited the offine file????
Anyone else encountered similar problems?
As per the previous post from Fabian, regarding no warnings on offline files, i am seeing the same problem.
It seems to be also while in office, if a file is marked for offline sync, it is not locking or reporting open by another user (if file inuse).
For Example, we normally use Excel Spreadsheets for some reporting. Under XP, if you went to access this file, it would report "XYZ user has this file open, would you like to use read only"
Under Vista, we are seeing that no dialogue box or warning is happening, an constant saving over the file is happening resulting in loss of data.
I try to enable offline files and than I reboot, It always tells me that Offlines file won't be available until after I restart. Well I have restarted 10 times. Any suggestions. I am using Windows Vista Business
I have same trouble as Bob pot a 8:57 am on 1/23/08...
With XP I could make files in a WORKGROUP Share avaialble offline on another WORKGROUP peer....
With VISTA changes do my files have to be on a full fleged server?
When online where does the client read its file first the server or the cache? In XP didnt it always read frm the cache first while online? my observations seem to point that in Vista it always reads from the server while in online mode.
This has become an issue for me becuase some applications that rely heavily on a redirected folder, like if the application data is redirected or if the "my games" folder in the documetns folder, many games will store saved games and such there and saving or reading from that area is usually really slow or not at all due to anti piracy software restricting access to game data that is on a network share.
Can this behaviour be fine tuned?