This project is read-only.

Overview

EPiServerCMIS provides CMIS support for EPiServer CMS 6 and allows it to connect to any CMIS compliant repository. It currently supports basic CRUD operations on files and folders and search. By default it connects to Alfresco's repository, but this can be reconfigured (see Changing the Repository).

Installation and Setup

Prerequisites

See System Requirements.

Download and install EPiServer CMS 6. After installing EPiServer CMS 6, create a new website.

Download the source code for EPiServerCMIS and NCMIS. Extract the source code; it is recommended that you save each project folder in the newly created website's folder (see image below) so that you will not need to change the build path of the projects.

recommended_path.png
Note that the NCMIS project folder is located in HEAD.

Open each project in Visual Studio. When opening the EPiServerCMIS project you will be promted to log in to Codeplex; press Cancel (i.e. work offline). When opening the NCMIS project a couple of error/warning messages will show up (about source control), just ignore them.

Check that the build output path of each project is set to the newly created website's bin folder. This can be done by right-clicking the project in the Solution Explorer -> Properties -> Build. For example, if the site is called DefaultSite the path would be C:\EPiServer\Sites\DefaultSite\bin.

Build the projects. Build the NCMIS project first as the EPiServerCMIS project needs the NCMIS DLL file in order to build correctly.

In the EPiServerCMIS package there is a dll called Microsoft.ServiceModel.Web.dll in the Rest Starter Kit DLL folder. Copy this file to the bin folder if needed.

Configuration

In the EPiServerCMIS project folder there is a folder called Config files. All configuration files (.config) are located here. Open episerver.config in a text editor and add the following code to the <providers> element (there should already be three default providers, Page Files, Global Files and Documents):
<add showInFileManager="true"
    virtualName="CMIS Files"
    virtualPath="~/cmisdoc/"
    bypassAccessCheck="true"
    name="CmisDocuments"
    type="EPiServer.Web.Hosting.VirtualPathCmisProvider, EPiServerCMIS"
    userName="admin"
    password="admin" 
    serviceDocumentUri="http://cmis.alfresco.com:80/service/cmis" />

Open web.config in a text editor and add the following code between <configSections> and <episerver> elements:
</configSections>
<appSettings>
    <!--<add key="RaServiceBaseUri" value="http://217.114.80.212/NCMIS/ServiceModel/Ra/" />--> <!-- Use localhost uri for local server -->
    <!--<add key="RaServiceBaseUri" value="http://localhost:61276/ServiceModel/Ra/" />-->	<!-- Never used, unsure if safe to delete -->
    <add key="RaServiceBaseUri" value="http://cmis.alfresco.com:80/"/>
</appSettings>
<episerver configSource="episerver.config" />

Finally, scroll down to the first <location> element and add the following code just above it:
<location path="cmisdoc">
    <system.webServer>
        <handlers>
            <add name="webresources" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />
            <add name="wildcard" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" />
        </handlers>
    </system.webServer>
    <staticFile expirationTime="-1.0:0:0" />
</location>

Running EPiServerCMIS

  1. If you have not already done so, compile both projects in Visual Studio and make sure that the project DLLs are outputted to the bin folder.
  2. Start EPiServer CMS 6 in a web browser and open the File Manager in Edit Mode.
  3. If everything is configured correctly there should now be a new tab called CMIS Files, see image below:
cmis_starting_point.png

EPiServerCMIS currently supports:

  • Browsing files and folders
  • Creating and deleting files and folders
  • Search

Changing the Repository (incomplete)

As mentioned previously, EPiServerCMIS is configured to connect to Alfresco's repository by default. To connect it to another repository, do the following:
  1. Open episerver.config and scroll down to the section with the following code and change the serviceDocumentUri attribute to the desired repository's service document URI. You may also need to change the userName and password attributes:
<add showInFileManager="true"
    virtualName="CMIS Files"
    virtualPath="~/cmisdoc/"
    bypassAccessCheck="true"
    name="CmisDocuments"
    type="EPiServer.Web.Hosting.VirtualPathCmisProvider, EPiServerCMIS"
    userName="admin"
    password="admin" 
    serviceDocumentUri="http://cmis.alfresco.com:80/service/cmis" />
  1. Open web.config and scroll down to the section with the following code and change the RaServiceBaseUri attribute to the appropriate service base URI:
<appSettings>
    <!--<add key="RaServiceBaseUri" value="http://217.114.80.212/NCMIS/ServiceModel/Ra/" />--> <!-- Use localhost uri for local server -->
    <!--<add key="RaServiceBaseUri" value="http://localhost:61276/ServiceModel/Ra/" />-->	<!-- Never used, unsure if safe to delete -->
    <add key="RaServiceBaseUri" value="http://cmis.alfresco.com:80/"/>
</appSettings>
You must also change the ServiceUri field located in CmisRestAtom.cs in the NCMIS project (NCMIS/ObjectModel/Rest).
...

Last edited Jan 13, 2011 at 10:32 AM by wizha, version 7

Comments

No comments yet.