Documentation

Docs / Development / WebDAV

WebDAV

sensenet ECM provides a way to access your content via WebDAV, allowing Microsoft Office, Windows Explorer, Total Commander, Visual Studio, etc to open and edit content residing in a sensenet ECM Content Repository. The Content Repository can be even mapped as a drive. Office documents can be opened directly from the portal surface with WebDAV. When a document opened via WebDAV is saved, it is automatically versioned, permissions are automatically checked, etc. Drag and drop move and copy also works.

Installation

WebDAV automatically works in sensenet ECM, but there are a few things you may have to configure before you can access your Content Repository as a file system.

Authentication

sensenet ECM supports the following authentication schemes with WebDAV:

Please note that support for Basic authentication has been introduced in sensenet ECM 6.1. Earlier versions must use Windows authentication for using WebDAV.

##### WebDAV publishing

Make sure you don’t have WebDAV publishing installed, as it may interfere with sensenet WebDAV features.

Opening Office documents

Managing documents in a workspace using Microsoft Office is a common feature of Enterprise Content Management Systems. Using sensenet ECM you are able to create, open or edit documents within Office. Opening and saving documents is also done using the WebDAV protocol. To open a document click the Edit in Microsoft Office action on the document:

Edit in Microsoft Office

The UI above is available only if you installed the WebPages component. If you do not have that, you can still put an action link onto your custom UI that lets your users open Office documents - please check the details on the link below.

For more info on managing Office documents in the sensenet ECM Content Repository within Microsoft Office please read the following article:

Mapping the Content Repository to a network drive

It is also possible to map the full sensenet Content Repository to a network drive. To do this first click the Map network drive… link in the context menu of This PC in Windows Explorer:

Map network drive

Select a suitable drive letter and enter the web address of your sensenet site:

Map network drive

After clicking Finish the Content Repository should appear in Windows Explorer:

Windows Explorer

From here onwards you can use this drive to manage your Content Repository: uploading, editing, deleting, renaming content can be done just like using a normal file system.

Uploading different file types

The sensenet ECM Content Repository has much more features than a simple file system. It can distinguish between different file types for example. An image for example in a regular file system is a simple file with .png or .jpg extension, an image in the sensenet ECM Content Repository however is a content of Image type, which is derived from the File type. Therefore when using the Content Repository via WebDAV it is desired to connect files with different extensions to the appropriate Content Type. This is done using the same setting that is used by the upload function on the ui:

UploadFileExtensions: {
   "jpg": "Image",
   "jpeg": "Image",
   "gif": "Image",
   "png": "Image",
   "bmp": "Image",
   "svg": "Image",
   "svgz": "Image",
   "tif": "Image",
   "tiff": "Image",
   "xaml": "WorkflowDefinition",
   "DefaultContentType": "File"
}

You’ll find the settings above in the /Root/System/Settings/Portal.settings content.

For example when dropping a file with .png extension the content created in the sensenet Content Repository will be of the Image type.

Configuration

The configuration for WebDAV can be found in the web.config under the webdav section.

<sensenet>
  <webdav>    
    <add key="MockExistingFiles" value="desktop.ini,Thumbs.db,wdmaud.drv,foo,MSGRHU32.ini" />
    <add key="WebdavEditExtensions" value=".docx,.pptx,.xlsx" />
  </webdav>

The following options can be set (all values are optional and have a reasonably correct default value):

Custom WebDAV provider

It is possible to customize the behavior of the WebDAV feature by developing a custom provider. Developers can restrict what users see in Windows Explorer and what they can do with files and folders.

Is something missing? See something that needs fixing? Propose a change here.