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.

Creating a login account for publishing

To create a login account and a user in the document vault for publishing purposes:

  1. Create a login, such as Publishing, on the server.
  2. Select M-Files authentication as the authentication method, and enter a password and other necessary data.
  3. Assign the user to the desired document vault.
  4. Define the user as an external user in the vault.
  5. Provide the user with read permissions for published documents.

Enabling the login account to log in automatically

Before continuing any further, make sure M-Files Web is configured properly. For more information, refer to Enabling Web and Mobile Access.

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. To ensure sufficient permissions, an unlimited read-only license is required.

To enable users to log in automatically:

  1. On the M-Files server computer, 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.

    Example of a registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Motive\M-Files\11.1.4310.92\Server\MFWA\Sites\1\

  2. Specify the registry key values to be used for automatic login. The table below lists the values available for specification.

    Registry key values for automatic login

    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.

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.

M-Files Web parameters for document opening page:

Parameter Description
docid ID of the document containing the file to be opened. This parameter is compulsory.
docver Version of the document containing the file to be opened. This parameter is not compulsory. 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 compulsory, unless the document containing the file is a multi-file document.
filever File version.
objtype Object type ID of the object to which the file to be opened belongs. This parameter is not compulsory. If this parameter is not used, the link always refers to files of the Document object type.
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?docid=71

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

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

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

Sharing documents via OneDrive

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