Document-specific Publishing via a Web Link

You can use M-Files for sharing documents with interested parties through direct web links. This feature makes it possible to, for example, provide a company web site with a direct link to a price list in M-Files. The link can be made to always refer to the latest version of the document, to be able to provide up-to-date information at all times. The link works in the same way as any ordinary web URL.

Normally, M-Files Web always requires a login name and a password to be entered. However, if the system is used for publishing, it may often be necessary to allow users to view documents without entering any credentials. To enable this, M-Files can be set to use a predetermined login account with, for example, read permissions for certain documents.

Enabling document-specific publishing via a web link

In order to enable document-specific publishing via a web link, the following steps have to be taken:

  1. Create a login account, such as Publishing, on the server. Select M-Files authentication as the authentication method, and enter a password and other necessary data.

    For instructions, see Creating a Login Account for Publishing below.

  2. Assign the user to the desired document vault and define the user as an external user.

    For instructions, see Assigning the Login Account to the Desired Vault below.

  3. Provide the user with read permissions for published documents.

    For instructions, see Providing the User with Read Permissions to Published Documents below.

  4. Enable the login account to log in automatically.

    For instructions, see Enabling the Login Account to Log In Automatically below.

  5. After this you can create direct web links to the vault.

    For instructions, see Creating Direct Web Links below.

Creating a Login Account for Publishing

In order to allow users to view documents without entering credentials, you must first create a login account that will be used to automatically log in to a specific vault.

Steps

  1. Open M-Files Admin on the M-Files Server computer used for publishing content.
  2. In the left-side tree view, expand the desired connection to M-Files Server.
  3. Highlight the Login Accounts node and click New Login Account... on the task pane.
    The Login Account Properties dialog is opened.
  4. In the Username field, enter a suitable username for the login account, such as Publishing.
  5. Select M-Files authentication as the authentication method, and enter a password of your choice in the Password and Confirm password fields.
  6. Optional: Enter personal information of the login account in the Full name and E-mail fields.
  7. Using the License type drop-down menu, select a license type for the login account.
  8. Click OK to finish creating the login account.

Results

The newly created login account is added to the Login Accounts list.

Assigning the Login Account to the Desired Vault

Next, the login account needs to be assigned to the vault that contains the published documents.

Steps

  1. Open M-Files Admin on the M-Files Server computer used for publishing content.
  2. In the left-side tree view, expand the desired connection to M-Files Server.
  3. In the left-side tree view, expand Document Vaults, then expand the desired vault and finally select the Users node.
  4. Click New User... on the task pane.
    The User Properties dialog is opened.
  5. Using the Login account drop-down menu, select the login account that you previously created.
  6. Check the External user check box.
  7. Optional: Check the User cannot create documents or other objects check box, if you wish to prevent users from creating documents or other objects with this user account.
  8. Optional: Check the User cannot create or modify check box, if you wish to prevent users from creating or modifying traditional folders with this user account.
  9. Click OK to finish creating the user.

Results

The user is added to the Users list.

Providing the User with Read Permissions to Published Documents

The user needs to be provided with appropriate permissions in order to access published documents.

Steps

  1. Open M-Files Admin on the M-Files Server computer used for publishing content.
  2. In the left-side tree view, expand the desired connection to M-Files Server.
  3. In the left-side tree view, expand the document vault of your choice.
  4. In the left-side tree view, select the Named Access Control Lists node under the selected vault.
  5. Either:
    1. Click New Named Access Control List... to define a new named access control list containing read permissions for the newly created user account.
      or
    2. Double-click an existing named access control list on the Named Access Control Lists list to define read permissions for the newly created user account.
    The Named Access Control List Properties dialog is opened.
  6. If you are creating a new named access control list, enter a suitable name for it in the Name field.
  7. Click Add... to add the newly created user to the Users and user groups list.
    The Select Users or User Groups dialog is opened.
  8. Select the newly created user from the Users or user groups list and click Add to add the user to the named access control list and to close the Select Users or User Groups dialog.
  9. Back in the Named Access Control List Properties dialog, highlight the newly added user and provide the user the following permissions using the check boxes below in the dialog:
    Permission Allow / Deny
    Change Permissions Deny
    Delete Deny
    Edit Deny
    Read Allow
  10. Optional: If your named access control list already has all permissions set to Allow for the All internal users user group, you can skip these steps. Do the following steps to allow all permissions for All internal users:
    1. Click Add... to add the All internal users user group to the Users and user groups list.
      The Select Users or User Groups dialog is opened.
    2. Select All internal users from the Users or user groups list and click Add.
    3. Highlight All internal users on the Users and user groups and check the Allow check box next to the All option on the Permissions list.
  11. Click OK to close the Named Access Control List Properties dialog.
  12. Assign the named access control list you just created or modified to all the public documents intended to be accessed without credentials.

Results

If you have created a new named access control list, it is added to the Named Access Control Lists list. Otherwise your changes are saved to the existing named access control list that you have modified.

Enabling the Login Account to Log In Automatically

To make it possible to view published documents without logging in, M-Files must be set to log in automatically through M-Files Web. This way, published documents can be viewed without entering a username and password.

Before you begin, make sure M-Files Web is configured properly. For more information, refer to Web and Mobile Access. To ensure sufficient permissions, an unlimited read-only license is required.

Steps

  1. On the M-Files Server computer, use Registry Editor to create the following registry key, where <version> is the M-Files version number (for example 11.1.4310.92) and <web site ID> is a unique ID assigned to the M-Files Web site by Internet Information Services (IIS):
    HKEY_LOCAL_MACHINE\SOFTWARE\Motive\M-Files\<version>\Server\MFWA\Sites\<web site ID>\
    • If there is only one web site, the site ID is usually 1.
    • If the M-Files Web site is running in the virtual directory of the web site, add a colon and the name of the virtual directory after the site ID. For example, if the application is accommodated in the M-Files Web virtual directory of this single web site, the web site ID is 1:MFWA.
    • The IIS server software in Windows 2003 displays the ID as one column.
  2. Specify the registry key values to be used for automatic login. The table below lists the values available for specification.
    Value Type Description
    Domain REG_SZ If the authentication method used is Windows authentication, use this value to specify the domain.
    Password REG_SZ Login password.
    UserName REG_SZ Login account name, for example "publishing".
    Vault REG_SZ The document vault ID. The value can be for instance {A8DCB561-913F-4318-A276-E7E171EAFBE6}. The value can be found in the Document Vault Properties window of M-Files Admin.
    WindowsUser REG_DWORD Specifies the authentication method. 0 means M-Files authentication, 1 means Windows authentication.
  3. Close Registry Editor.

Results

The selected login account can now be used to automatically log in to M-Files Web and the account can be used for accessing published documents without entering a username and password.

Creating Direct Web Links

Once automatic login is enabled, you can create direct web links between, for example, the company web site and document files. The opening page, openfile.aspx, can be assigned the following parameters:

Parameter Description
objtype Object type ID of the object to which the file to be opened belongs. This parameter is required. You can see the list of object type IDs by completing the first four steps of the Creating a New Object Type task.
docid ID of the document containing the file to be opened. This parameter is required.
docver Version of the document containing the file to be opened. This parameter is not required. If this parameter is not used, the link always refers to the latest version of the document.
fileid ID of the file to be opened. This parameter is not required unless the document containing the file is a multi-file document.
filever File version.
showopendialog This parameter specifies whether or not the web browser displays an opening dialog. If the value assigned to this parameter is 0, the dialog is not displayed.

As described above, you can provide your web site with a link that refers directly to a document. Below are examples of such web links. Replace <server> with the web address of your own server.

http://<server>/openfile.aspx?objtype=0&docid=71

http://<server>/openfile.aspx?objtype=0&docid=71&docver=7

http://<server>/openfile.aspx?objtype=0&docid=71&docver=7&fileid=71

http://<server>/openfile.aspx?objtype=0&docid=71&showopendialog=0

Sharing documents via OneDrive

In addition, you can use Share via OneDrive links for version-specific publication of individual documents.

© M-Files Corporation 2016
Last updated 10/2016