Renewing Certificate on BranchCache Error

Problem:  Hosted Cache server's SSL certificate expired.  New certificate has a different thumbprint.  Error when linking the new certificate thumbprint to BranchCache server.

Error:  SSL Certificate add failed, Error: 183.  Cannot create a file when that file already exists.

Solution:  You cannot associate a new certificate to the BranchCache server until the old certificate information is deleted from HTTP.sys.  Use the following commands to correct the problem:

C:\Users\Administrator> netsh http delete sslcert ipport=
SSL Certificate successfully deleted 

Link the new certificate after the old certificate is deleted from HTTP.sys:

netsh http add sslcert ipport= certhash=xxxxxxxxxxxxxxxx appid={d673f5ee-a714-454d-8de2-492e4c1bd8f8}

Prehash BranchCache Server

This article explains how to preload content on a BranchCache server.

  1. Generate hash package on the file server:

    PS C:\> Publish-BCFileContent -Path D:\share -StageData
  2. Export hash package to temporary directory:

    PS C:\> Export-BCDataPackage –Destination D:\temp

  3. Copy hash package to a temporary directory on the the remotely hosted-cache server.

  4. Import hash package on hosted-cache server:

    PS C:\> Import-BCCachePackage –Path D:\temp\
That's it!  Branch office users will immediately benefit from this pre-hasing process. 


2012 BranchCache Troubleshooting

Problem:  BranchCache services do not work as expected.

Background:  BranchCache services are installed in a hub and spoke topology; data center serves multiple branch offices.

File servers at the data center are enabled as BranchCache content hosts.  BranchCache hosted cache servers set-up at each branch office. 

Troubleshooting: There is not a single pane BranchCahce GUI for management and monitoring -too bad!  The following steps confirm if BranchCache works:

1.  Confirm BranchCache is properly configured and operational on the servers and clients:

PowerShell:  Get-BCStatus

CMD:  netsh branchcache show status all

2.  Use Performance Monitor to check for real-time BranchCache activity (or lack of):

a)  Open PerfMon.

b)  Add the BranchCache counter.

c.)  Change graph type to "report".  The statistics will increase in real-time when any BranchCache file transfer takes place:

d)  Transfer data.  If BranchCache is working, the above highlighted numbers will increase in real-time.


I missed the elephant in the room.

The problem was the specific version of Windows 8 used for the tests.  Windows 8 Enterprise must be used when working with BranchCache; not Professional.

This may seem obvious to anyone that has worked with the 2008R2 and Windows 7 BranchCache; however all the prerequisites from Microsoft simply read, "Windows 8" whereas Microsoft specifically indicated, "Windows 7 Enterprise".

Last updated  March 30th, 2014 by Steven Jordan

DFS Namespace problems at branch offices.

Symptoms:  Some Offline Files are inaccessible from the DFS namespace.  Users may get the following errors when working on the files server from branch offices:

          “locked for editing by another user” 

Other users may get a "sync status" error, or "offline files unavailable", while connected to the LAN from the branch office.

Users may experience missing files or directories.  Workstation system error log may indicate:  

     EVENT ID:  1004
       Path \\file path transitioned to slow link with latency = 74 and bandwidth = 10580536

The problem is most like caused because of high latency between the main office and the branch office when DFS Namespace is enabled.

Windows Offline files measures for latency and sets the default threshold at 80ms for Windows 7.   When the latency from the branch office passed the Offline threshold the DFS namespace 
directory automatically transitions  to offline mode.
The Offline Files treats DFS namespace and DFS network shares separately.  A namespace can be offline while it's child directories remain online; or vice-verse.

Even worse, if a client attempts to access the target Offline, and the target is unavailable, the Windows client interprets the entire namespace as unavailable; and will attempt to open a user’s locally cached files (if they exist).  If they don't exist the user will get network unavailable or permission errors.

Here is a good explanation:

The files never properly transitioned to an online state.  Disabling the Offline Mode was the only short-term solution that seemed to correct the DFS namespace problem.  This is not practical long-term because staff may want to use the Offline File Sync.  BranchCache also has a dependency on the Offline Files service.

To resolve the cached DFS namespace must be manually deleted from the cache directory before the DFS root and the Offlies Files can run simultaneously.  There may be an easier way but these are the steps I took:
1.  Disabled Offlie Files.

2.  Installed the Windows Resource Tool, SubinACL, to allow me to take ownership of the Offline cache directories.

     SubinACL is located at

SubinACL doesn't have to be used but all files are owned by the System; manually changing ownership and permissions would take forever.

3.  From the command line:

C:\Program Files (x86)\Windows Resource Kits\tools>subinacl.exe /subdirectories c:\windows\CSC\*.* /\username

4. Manually Deleted the namespace directory from:  C:\Windows\CSC\v2.0.6\
    There may also be a directory for the local namespace file server that should be deleted as well.
After ownership has been applied the security for the user must be changed to full or modify.  Be sure to apply  the change to all child directories or the files cannot be deleted.
Things should be back to normal after a restart.
I was surprised we hadn't run into this issue earlier.  For whatever reason, latency did seem higher than usual when the problem started.  To correct the problem the Offline latency threshold limits in either the local or group policy must be set.

Local Computer Policy > Administrative Templates > Network > Offline Files > Configure slow-link mode
Because this issue can impact any staff, at branch offices, or on VPNs, I recommend this GPO when DFS namespaces are used in correlation with branch offices.  My understanding this latency group policy setting is independent from latency settings for BranchCache in Group Policy. 

Last updated  July 16th, 2013 by Steven Jordan