Installation of the Render Engine

The operation of the Editor requires the server role webserver (IIS) with the activated role service "Application Development Features/ASP.NET". In the live environment, we recommend to use the module Application Request Routing (ARR) for IIS 7 in order to be able to use URL Rewriting.

For the installation of the live environment, we proceed in a slightly different way to that of the preview environment. In this case, we will not put the Render Engine under "c:\\web\contoso\preview" but under "c:\\web\" instead. 

1. Copy the Render Engine

In this installation, we create a new website with an Render Engine. To do this, copy the directory „ Render Engine" of the distribution into your desired target directory. In our example, this is the directory "c:\\web\".

2. Create a website

Open the „Internet Information Services manager“ now.

2.1. Add a new website

Click on Sites with the right mouse button and add a new website.

3. Adjust the configuration file

Open the file „web.config“ from the target directory.

3.1. Configure the Data Source

With the Render Engine, it is possible to connect multiple data sources. All data sources are listed in the configuration section "dataSources" (search for „<dataSources>" to find this section). Change the IP address if the Information Server has been installed on a different server in the network.

3.2. Adjust paths to the application

The Render Engine has been designed in such a way that URL rewriting is supported and that URLs can be adjusted to individual needs. Due to this, the paths must be configured to generate correct references. To do this, replace „/renderengine/" by "/projectname/preview/".

3.3. Configure the cache directory

The Render Engine reduces the load of the Information Server by caching strategies. To achieve this, rendering results are buffered in the working memory or on the hard disk drive. These directories must not be accessed via the webserver. Old cache directories are deleted from the Management Server in a background process. Configure a directory in the configuration section "storage". In our example, the correct path is "c:\\cache\web".

Note: The efficiency of the memory medium linked to this directory increases the output performance of the system. 

3.4. Configure the Image Server

Add another module in the section modules as shown in the Figure.

<module type="Onion.RenderEngine.ImageServiceClient.ImageServiceModule, Onion.RenderEngine.ImageServiceClient">
  <imageServer uri="tcp://localhost:8083/onion/imageserver" priority="1" />

You can configure any number of Image Servers. To add more Image Servers, you need to add more "imageServer" elements in the module. The higher the priority, the more frequently the Image Server will be addressed. A configured priority of 2:1 with two Image Servers thus means that the first Image Server is twice as often addressed as the second one. If one Image Server fails, a search for the next available Image Server will be initiated.

3.5. Log of incidents

For the protocol of incidents, log4net is used. The configuration options of log4net can be found in the Chapter log4net.

With the standard settings, a log file is created in the current directory under logs\debug.log. Since the installation example contains a log directory under "c:\", this directory can also be configured, for example: "c:\\logs\contoso\live.log".

4. Configuration of the Application Request Routing (ARR)

Following the installation, the ARR will provide a load balancing and URL rewriting. You should now use the URL Reqriting from the ARR.

The functioning principle of URL rewriting can be explained with a few words. There is a website accessed by web requests. On this website, URL rewrite rules have been defined so that the requests are redirected to a configured server farm and rewritten, if and as required. In the server farm, one or several servers (IP address and port) have been configured. These servers are the Render Engines.

The following steps describe how to remove the handler page.ashx from the URLs. 

4.1. Change the port of the webapplication

Change the port to another one, for example to port 50,000. In order to have a better overview, you should rename the website from "" to " (50000)". The Render Engine can now be accessed via port 50,000.

4.2. Create a new webfarm

Create a new webfarm "" now and add a new server.

Configure localhost or as server address. Show the extended settings and expand the item applicationRequestRouting. Set the httpPort from port 80 to port 50.000. Then click on "Add".

Click on "Finish". 

Decline the following dialog by clicking "No".

4.3. Create a website for ARR

First, we need another directory structure. Create the directory "arr" under "c:\", and then create "" under this new directory.

Now create another website in the IIS. As site name, you should now use "" again and select "c:\\arr\" as physical path. The port connection is port 80 again.

4.4. Define ARR rules

Click on the module "URL Rewrite" in the category IIS of the newly created website. Create the following rules.

4.4.1. URL for captcha graphics

Add an empty rule.

  • Enter the name "Captcha".
  • Select the item "Wildcards" under "Using".
  • Enter "captcha.aspx" (without inverted commas) into the input field "Pattern"
  • Enter{R:0} in the field "Rewrite URL" further down. "" is the name of the webfarm.
  • Activate the field "Stop processing of subsequent rules".

4.4.2. URL for binary data

Add another empty rule.

  • Enter the name "Binaries".
  • Select "Wildcards" under "Using".
  • Enter "binary.ashx*" (without inverted commas) into the input field "Pattern"
  • Enter "{R:1}" in the field "Rewrite URL" further down.
  • Activate the field "Stop processing of subsequent rules".

4.4.3. URL for websites

Add another empty rule to create a third rule.

  • Enter the name "Pages".
  • Select the item "Wildcards" under "Using".
  • Enter "*" (without inverted commas) into the input field  "Pattern".
  • Enter "{R:0}" in the field "Rewrite URL" further down.
  • Activate the field "Stop processing of subsequent rules".

The directory "c:\\arr\" now contains a web.config. Its contents should be as follows:

<?xml version="1.0" encoding="UTF-8"?>
                <rule name="Captcha" patternSyntax="Wildcard" stopProcessing="true">
                    <match url="captcha.ashx" />
                    <action type="Rewrite" url="" />
                <rule name="Binaries" patternSyntax="Wildcard" stopProcessing="true">
                    <match url="binary.ashx*" />
                    <action type="Rewrite" url="{R:1}" />
                <rule name="Pages" patternSyntax="Wildcard" stopProcessing="true">
                    <match url="*" />
                    <action type="Rewrite" url="{R:0}" />

4.5. Configuration of the URI format

The section uriFormat in the web.config of the Render Engine now needs to be adjusted. In the section builder/format, the attribute literal-path is set to empty because page.ashx should no longer appear in the URL.

To the subsection parser within the section uriFormat, the format element with the attributes literal-path and binary-path now needs to be added as child element.

The section should look as follows: 

<uriFormat staticFormatterPath="/binary.ashx/data" staticParserPath="/binary.ashx/data">
  <builder type="Onion.RenderEngine.DataSource.OnionUriPathFormat, Onion.RenderEngine.DataSource">
  <parser type="Onion.RenderEngine.DataSource.OnionUriPathFormat, Onion.RenderEngine.DataSource">
    <format literal-path="/page.ashx" binary-path="/binary.ashx" />