Configuration options for the web.config file

Prev Next

This article describes further configuration options within the web.config file.

App settings

Find the configuration parameters in appSettings within the <appSettings> section of the web.config file.

Custom Data Sources

Custom data sources are registered in a separate section called customDataSources.

<customDataSources>
 <add key="CSVDataEngine.CSVDataSourceParser" 
 value="CSV Datenquelle;c:\dox42\dox42WebService\bin\CSVDataEngine.dll;"/>
</customDataSources>

Custom Output Actions

Custom output actions sources are registered in a specified section called customOutputActions.

<customOutputActions>
 <add key="MyCustomOutputActions.MyOutputAction"
 value=" MyOutputAction; c:\dox42\dox42WebService\bin\MyCustomOutputActions.dll;"/>
</customOutputActions>

Trusted template locations

Trusted template locations are registered in a specified section called trustedTemplateLocations.

<trustedTemplateLocations>
 <add key="local" value="C:\dox42Server\templates"/>
 <add key="sharepoint" value="http://www.mysharepoint.mycompany.com/dox42Templates"/>
 </trustedTemplateLocations>

Log settings

Configure log settings in the NLog.config file. For a complete documentation of the logging framework NLog see www.nlog-project.org.

CORS Configuration

If a web application calls the dox42 Server, e.g. via Javascript XMLHttpRequest under a different URL than the application itself, you might get a Cross-Origin Resource Sharing (CORS) error.

Example

Calling web application:https://yourcompany.sharepoint.com/yoursite

dox42 Server: https://dox42server.yourcompany.com

To enable this scenario, you could add a customHeaders section to your web.config file:

<system.webServer>
 <httpProtocol>
 <customHeaders>
 <clear />
 <add name="Access-Control-Allow-Origin" value="*" />
 <add name="Access-Control-Allow-Headers"
 value="Content-Type, Accept, Authorization" />
 <add name="Access-Control-Allow-Methods" value="GET,POST,OPTIONS" />
 <add name="Access-Control-Expose-Headers"
 value= "Content-Type, Content-Disposition, Accept" />
 </customHeaders>
 </httpProtocol>
 </system.webServer>

Fore more information, see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS and http://www.w3.org/TR/cors/.

Microsoft Entra ID Access

This is necessary to store dox42 templates and data maps on Microsoft SharePoint Online.

ConfigSection

<configSections>
 . . .
 <section name ="azureAD" type ="dox42.Core.Utils.AzureADSectionHandler,dox42Core"/>
</configSections>

Entra ID Section

Microsoft Entra ID and Microsoft Azure AD

In 2023, Microsoft has renamed Azure Active Directory (Azure AD) to Microsoft Entra ID. Both names refer to the same platform.

<azureAD>
 <add resource365="https://mytenant.sharepoint.com" 
 appID="…"
 tenant="…" 
 clientKey="*********************************" /> 
</azureAD>

Custom Error Messages Sample

In case you edit this file using a text editor, please be sure to save in UTF-8 encoding.

<?xml version="1.0" encoding="utf-8"?>
<CustomErrorMessagesDS xmlns="http://dox42.com/CustomErrorMessagesDS.xsd">
 <CustomErrorMessage>
 <Test2SearchInExc>Error uploading file http://mysharepoint</Test2SearchInExc>
 <NewMessage>
 SharePoint-farm not responding, please contact your administrator</NewMessage>
 </CustomErrorMessage>
</CustomErrorMessagesDS>

Hyphenation Dictionaries Sample

To use automatic hyphenation with the dox42 Word Add-In save a file named HyphenationDictionary.config to C:\Users\<<USER>>\AppData\Local\dox42V1.

The file should use this structure:

<?xml version="1.0" standalone="yes"?>
<HyphenationDictionary xmlns="http://www.dox42.com/HyphenationDictionary.xsd">
 <Dictionary>
 <Culture>de-CH</Culture>
 <DictionaryPath>C:\dox42Server\hyph_de_CH.dic</DictionaryPath>
 </Dictionary>
</HyphenationDictionary>

Maximum size of request or time-out

Should you be sending large requests to dox42, return large files or start a bulk letter, it might become necessary to increase request size or time-out (the default ASP.NET time-out is 90 sec. After that, a longer call will be aborted by the IIS).

  1. Configure this in the web.config file as follows:

    • When you work with the https method POST (base64) and you are getting the error message “413 Request entity too large”, you can change the Maximum allowed content length (bytes) parameter on the IIS server.

    • In ISS, navigate to Request Filtering, select Edit Feature Settings and change the maximum allowed content length from 30000000 to 2147483647.

    <system.web>
     <httpRuntime maxRequestLength="10000000" executionTimeout="1000"/>
    </system.web>
Editing request filtering settings with maximum allowed content length highlighted.

Editing request filtering settings with maximum allowed content length highlighted

License Activation

Enter the license key in the web.config file as LicenseKey.
On the first call the dox42 Server will contact the dox42 license server to activate your key and write a license file (*.lic) in the folder indicated under LicenseFilePath.

Note

  • If the Server is only allowed to access the internet via Proxy, the entry <system.net> in the web.config file could help.

    XML configuration file showing proxy settings and license file path details.

    Configuration settings for a web application, including authentication and license information

  • In case you cannot establish an internet connection from your server, please contact support@dox42.com. We will provide you with your license file.