Disabling Office 2010 Sharepoint-like Integration with SVN WebDAV Repositories


2 views

When users access Office documents through Internet Explorer from a Subversion repository with WebDAV support, Office 2010+ interprets this as a Sharepoint connection. This triggers automatic locking behavior and direct server updates - exactly what we don't want in a traditional SVN workflow where changes should go through explicit commits.

Office applications check for these server characteristics:

1. WebDAV support (HTTP OPTIONS returns "DAV" header)
2. Microsoft-specific headers (MS-Author-Via, X-MSDAVEXT)
3. URL patterns matching Office collaboration features

Modifying Apache Configuration

Add these directives to your SVN repository's VirtualHost or Location block:

<Location /svn>
    # Disable Office integration headers
    Header unset MS-Author-Via
    Header unset X-MSDAVEXT
    
    # Force download behavior for Office files
    <FilesMatch "\.(docx?|xlsx?|pptx?)$">
        ForceType application/octet-stream
        Header set Content-Disposition "attachment"
    </FilesMatch>
</Location>

WebDAV Protocol Tweaks

Modify the SVN WebDAV responses to exclude Office-specific markers:

# In your Subversion DAV configuration
DAVMinTimeout 0
SVNAdvertiseV2Protocol Off

For environments where you can influence client machines, implement these registry tweaks:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\Internet]
"ForceShellExecute"=dword:00000001
"DisableLockingOnNonSharePointSites"=dword:00000001

Verify the changes by checking server responses:

curl -I https://yourserver/svn/path/document.docx
# Should NOT include:
# MS-Author-Via: DAV
# X-MSDAVEXT: 1

For organizations using newer Apache versions, consider these additional measures:

<IfModule mod_headers.c>
    RequestHeader unset MS-Author-Via
    RequestHeader unset X-MSDAVEXT
</IfModule>

When accessing Office documents through Internet Explorer from a Subversion repository with WebDAV support, Office 2010+ treats them as SharePoint documents. This creates unwanted behavior:

  • Documents open in "online mode" instead of local temporary copies
  • Automatic locking attempts occur on the repository
  • Changes get pushed back automatically via WebDAV

The most effective approach is to modify your Apache config to make Office recognize this isn't a SharePoint server. Add these directives to your SVN location block:

<Location /svn>
    # Your existing SVN config...
    
    # Disable SharePoint identification
    Header set MS-Author-Via "DAV"
    Header unset MicrosoftSharePointTeamServices
    Header unset X-MSDAVEXT
    Header unset X-DocRef
    
    # Force download behavior
    Header set Content-Disposition "attachment"
</Location>

For users who must use IE, create a registry file to disable WebDAV integration:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\Internet]
"ForceShellExecute"=dword:00000001
"UseOnlineContent"=dword:00000000

Recommend these workflows to avoid the issue entirely:

# Using TortoiseSVN directly
svn checkout http://svn.example.com/repo/trunk/docs
# Then open files locally from working copy

# Or force download via direct URL syntax
http://svn.example.com/svn/repo/trunk/doc.docx?forcedownload=1

Office checks these server indicators to trigger SharePoint-like behavior:

  • Presence of MS-Author-Via header with DAV value
  • X-MSDAVEXT header indicating extended WebDAV features
  • Content-Type matching application/x-ms-* patterns
  • OPTIONS response listing DAV capabilities

Our Apache modifications specifically target these detection mechanisms while maintaining actual WebDAV functionality for SVN operations.