M-Files Server / Enabling Web and Mobile Access |
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 link (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 the credentials. To enable this, M-Files can be set to use a predetermined login account with, for example, read permissions for certain documents.
To create a login account and a user in the document vault for publishing purposes:
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. In this way, published documents can be viewed without entering a user name and password. To ensure sufficient permissions, an unlimited read-only license is required. Below are the instructions for enabling automatic login.
On the M-Files server, create the following registry key, where <version> is the M-Files version number (for example 9.0.3074.0) and <web site ID> is a unique ID assigned to the M-Files Web site by IIS. 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.
HKEY_LOCAL_MACHINE\SOFTWARE\Motive\M-Files\<version>\Server\MFWA\Sites\<web site ID>\
Example of a registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Motive\M-Files\7.0.1234.0\Server\MFWA\Sites\1\
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. |
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 |
---|---|
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. <server> is the web address of the server used.
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
In addition, you can use Share via OneDrive links for version-specific publication of individual documents.