Offline Files

One of the key things that we focused on for Windows Vista was improving the experience for mobile (laptop) users.  If you are like me, you spend quite a bit of time running around with a laptop.  However, when I am in my office, I tend to use my desktop.  The primary way that I share files between my desktop and my laptop is by storing them on a Windows Server (it's also the primary way that I make sure that my files get backed up).  For example, at Microsoft we redirect the "Documents" folder (previously known as "My Documents" in Windows XP) to a share on the server (of course, we use access controls on the folders to make sure that I am the only person who can see my files).

By redirecting key folders like the Documents folder to a file share, my documents are available to me no matter which one of my Windows PCs I am using.  The problem of course is what happens when I don't have access to the server -- such as when I am not on the corporate network or perhaps sitting on an airplane.  Frankly, the same problem exists with any file share that I might try to access when I am not on the corporate network.

Well, as it turns out, we have had a very cool feature in Windows (actually, it's been there since Windows 2000) called "Offline Files."  (We actually used to call it "Offline Folders.")  As the name implies, Offline Files allows you to mark particular folders (and their sub-folders) to be available offline.  When you are on the network, Offline Files automatically synchronizes the folders so that you have a copy of them locally on your hard disk.  Then when you are offline (and don't have access to the actual server), Offline Files makes it look like you are online by simply accessing the locally cached copy.  Later, when you do have access to the file share, Offline Files automatically synchronizes any changes you have made offline with the online version and vice-versa.

So why am I telling you about a feature that's been available since Windows 2000 here in the Windows Vista Team blog?  Well, frankly, because we have made quite a few enhancements in the Offline Files support for Windows Vista.  Here are some examples.

In Windows XP, the transition from online to offline was pretty seamless -- which was good.  The problem was that when you came back to the network and tried to reconnect, it was sometimes less than seamless -- and we fixed that with Windows Vista.  Now, when Windows Vista detects that the server is available, not only do we automatically synchronize any files and folders that changed, but we also automatically redirect any open files to the online copy.

Another thing that always bugged me before Windows Vista was the fact that there was no way to force the transition to "offline mode."  I don't know about you, but before I get on a plane for 5 hours I want to make sure that all the documents that I need are locally available on my laptop.  Prior to Windows Vista, I had to manually turn off my wireless card to make the system think I was offline.  The problem there was that it was a complete disconnect that killed my connection to the Exchange Server.  Now, with Windows Vista, there is a button right in the Explorer tool bar (that is available whenever I am looking at a file share) called "Work Offline" that automatically forces the transition to offline mode.  Of course, when you click the button it changes from "Work Offline" to "Work Online" so that you can force the transition back.  This is a simple way to verify exactly what you will see when you are travelling to double-check that you have everything that you need.

We did some other "fit-and-finish" things to Offline Folders to make it more usable as well.  One example of this is the way that we synchronize the offline files with the online copy.  Offline Files in Windows Vista keeps track of the blocks that are modified while offline and only transfers the changed blocks to the server.  This makes synchronization of changes from the client to the server much faster. I should note that this optimization is only used when transferring changes from client to server; it is not used when transferring changes from the server to the client.  I should also note that some applications (like Microsoft Word) create a new file when you modify an existing document, so you won't see the benefit here.

We also changed the synchronization approach so that we now only try to synchronize the shares for the user that is logged on.  This addresses a problem that users would hit in the past when we used to try to sync all offline folders and the user saw an "access denied" error for the folders that actually belonged to someone else.  Navjot Virk, the program manager for Offline Files, wrote a great blog entry on Offline Files that covers this in more detail and I encourage you to check it out.

There are many ways you can turn on Offline Files.  The simplest way is to browse to a file server, right-mouse to get the context menu for the folder or file that you want to be automatically cached, and select "Always Available Offline."  You are done; it's just that easy.  Work with the files/folders just like you would normally whether you are travelling (and disconnected from the network) or working at your desk (and connected to the network).  Windows Vista's Offline Files automatically synchronizes all the changes for you without you having to do anything.

Offline Files 2 

If you want to force a manual synchronization, then right-mouse on the folder/file and select "Sync."  You can of course use the "Sync Center" to do this, too.

If you want to have your entire "Documents," "Desktop," "Music," etc., be located on a server (or perhaps different servers), but cached (and synchronized) locally, then simply change the location of the folder to be on a server (or another client) and then mark the folder on the server to  be available offline.  See below.

Offline Files 1 

So if you are like me and you work with multiple Windows PCs and sometimes are not on your main network, go give Offline Folders a try on Windows Vista.  If you are someone who tried it before on Windows XP, then I think you will be very happy with the enhancements we've made in Windows Vista.

jim


Comments

  1. Posted on: March 26, 2007 at 5:00PM  

    stevem...

    You may want to enable the "slow link" behavior in Offline Files.  This is intended for mobile computers that frequently access network resources over low bandwidth or high latency connections.  The idea is that when you’re accessing a cached network resource over a slow connection you work offline to improve performance.  This behavior is enabled through Group Policy.  You can do this using GPEDIT.MSC.  Open the editor.  Expand the following item tree.  "Computer Config -> Admin Templates -> Network -> Offline Files" and find the policy titled "Configure slow-link mode".  Enable the policy.  Using the "Show" button, add an entry with a single asterisk as the name and a value of "latency=25".  The latency value identifies the latency threshold where we consider the connection "slow"; expressed in milliseconds.  Depending on your connection performance you may need to experiment with this value but 25 is a reasonable place to start.  With this in place, the Offline Files service should transition your offline "scopes" to the "offline (slow connection)" state.  This state should appear in Explorer's preview pane as the "Offline Status" property.  You can temporarily transition online by pressing the "Work online" button in Explorer.  The slow scope will again transition offline in 5 minutes, assuming the connection is still considered slow at that time.  This time period is adjustable in the "Network" page of the Offline Files control panel applet.  Note that when you first establish a VPN connection to your work Offline Files will immediately transition online.  Then, in a few minutes it will determine that the connection is slow and transition the scope to offline at that time.  We have prepared a change for the first service pack that will speed up this transition so that it happens immediately following the VPN connection.  

    As for the opportunistic locking, that must be enabled on the server for Offline Files to work correctly on the Vista client.  OpLocks are necessary to ensure that the Offline Files cache knows whether or not it is safe to cache READ and WRITE operations on the client.

  2. Posted on: March 26, 2007 at 5:46PM  

    on: Changes to the namespace are not allowed while working offline.

    I'm used to using the windows briefcase feature to handle even large amounts of offline files and folders, and although I know all the disadvantages of this feature it is still able to easily synchronize even folders that have been deleted offline. If this somewhat difficult process of synchronisation of the briefcase would be performed kind of automatically as with the offline file feature, it would be perfect. What is the major difference between the two and why can the process of synchonizing deleted offline folders not be taken from the windows briefcase to the offline files feature?

  3. Posted on: March 26, 2007 at 11:18PM  

    Brian,  thanks, i think that the "Configure slow-link mode" change has fixed it... will monitor it for a few days and let you know if any further problems, and yes, i meant "endabled" re: oplocks, sorry for any confusion... thanks again.

  4. Posted on: March 27, 2007 at 12:40PM  

    schmidtrene...

    As you probably know, Briefcase is a very old (Win95) feature.  Vista Offline Files was developed independently of Briefcase.  Briefcase is synchronizing a file system path with its "database" while Offline Files is synchronizing folders in the remote file system with a local cache.  The code that accesses that local cache is very specialized.  While this is a reasonable thought, using all or part of the Briefcase sync engine for Offline Files was never a consideration.  

    I just tried an offline rename of a directory using Vista Briefcase and the subsequent sync operation thinks that the renamed directory has been deleted.  The conflict resolution dialog displays one entry for every file that exists under that renamed directory.  Do you see a different result?  

    For the Offline Files scenarios we can easily be working with thousands of files under a renamed folder.  In addition, the time a client spends offline can extend into days or weeks during which multiple moves or renames of folders can occur.  Our goal is to handle these situations as automatically as we can. As far as I know Briefcase was not designed to gracefully handle such complex scenarios.

  5. Posted on: March 28, 2007 at 2:36AM  

    Hi all,

    I have the same problem as QbaW posted at Feb, 21.

    I have a desktop running XP Pro SP2 and a notebook running vista ultimate 32 (german).

    On my notebook I declared one Network Path as available offline.

    Now, when my notebook is offline and I modify an excel or word or powerpiont file, then after reconnecting to my network and doing a sync there is an sync error (access denied).

    Instead, when I edit a text file (with ultraedit) there is no problem on syncing.

    Can anybody help me please.

  6. Posted on: March 28, 2007 at 6:56PM  

    Hi,

    I have the following problem using Vista Business: We've set up file shares on our SBS 2003 R2 as a DFS share and map network drive (let's say it's V:) as a UNC path \\domainname\DfsRootName. I set up v:\projects as offline files folder on vista.

    The problem is that files are not sychronized when Vista resumes from sleep or when it switches networks (like from cable to wireless) and there are no "go online buttons" in explorer.

    Is this feature supported on DFS shares at all? I like DFS since I can move "folders" inside DFS share accross disks or even computers (or continents)...

    Regards,

    Nejc

  7. Posted on: March 29, 2007 at 4:06AM  

    Hi,

    Scenario - Serveral Vista Ultimate users (IT Technicains) spread over Europe who have a central repository for user account information, budgets, etc.  All excel files, all used frequently.

    Technicains needs to have this information to hand 24/7 as are on call at night.

    With XP we simply set the folders to be available off line and let windows manage the synchronisation.  However with vista if we make the files available off line on each laptop and the technicain is connected to the network resource the machine is still using the cached copy of the files.  Thus if technicain A opens the file from the network and is modifying the file, technician B can access the file also with change ability and we get lots and lots of sync conflicts.  (User B does not get the standard "this file is in use by technicain A and so will be opened in a read only state")

    Is this by design or can we force it to only use cached files when the server is not avaiable?  (Vista knows the server is available as under offline status it is showing as Online.  Also we have the "Work Offline" option available).

    Anyone else having this issue??

    G

  8. Posted on: March 29, 2007 at 11:22AM  

    DaddyO:

    Check your cache settings on the server share. I've never liked the description for these settings, but it sounds like you're using "Automatic caching of programs and documents" which does not ensure file sharing. Use the "Manual caching of documents" or "Automatic caching of documents" settings. Vista has comparable settings if your host environment is running it, although the descriptions there provide even less information about the file sharing results you're likely to experience, so I don't know if the behavior has changed.

  9. Posted on: March 29, 2007 at 11:39AM  

    Hi arron,

    The NAS unit is running Windows 2000 advanced server (Fully patched).  On the share cache settings (Right clicking the share, going to the share tab and clicking the caching button) we have a tick in the "Allow caching of files in this shared folder" and in the drop down list is already currently set to "Manual Caching for Documents".

    Thanks for the tip, but it does not seem to be this issue.  

  10. Posted on: March 30, 2007 at 8:31PM  

    I'm completely stuck with offline files; Vista Ultimate, SBS 2003 file shares. I marked a folder to be available offline, realised it would be too big and stopped the sync. Now I can't log into the server for files at all unless I disable offline files; I get errors telling me I can't be logged in under multiple names. With no access to the server, the offline files never sync. Disable offline files and I can get right back in again. I used the REG add command referred to on several MS blogs to clear the cache when offline files is disabled, re-enabled it and the same set of files is cached and I can't get into the file shares again. Suggestions please?

Trackbacks

  1. Posted by: Absoblogginlutely on January 29, 2007 at 7:31PM

    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...

  2. Posted by: The Filing Cabinet on January 30, 2007 at 1:14PM

    Jim Allchin has been using Offline Files and loves it! Check out his write-up over in the Windows Vista

  3. Posted by: Windows Vista Team Blog on June 08, 2007 at 12:28PM

    In his blog, Microsoft IT Evangelist Keith Combs mentions a couple upcoming chats scheduled for July

  4. Posted by: conexiva.net » C??mo hacer un reinicio (reset) de la base de datos de los Archivos Sin Conexi??n (Offline Files) en Vista on February 03, 2009 at 8:53PM

    Pingback from  conexiva.net » C??mo hacer un reinicio (reset) de la base de datos de los Archivos Sin Conexi??n (Offline Files) en Vista