Hosting configurations

Overview

Sitefinity CMS ASP.NET Core Renderer is a standalone application, which you can host separately from Sitefinity CMS.

PREREQUISITES: The hosting provider must support ASP.NET Core Framework.

The following scenarios for hosting Sitefinity ASP.NET Core Renderer application are supported:

  • Local
    In this scenario, both the Renderer and Sitefinity CMS applications run on the local user machine, but are hosted under different ports –  for example, localhost:1234 for Sitefinity CMS and localhost:5000 for the Renderer application.
    The setup of this scenario is described in the Setup procedure
  • Cloud
    In this scenario, both applications are be hosted in the cloud – for example as two separate services in Azure App Services.
  • Mixed (Development) 
    In this scenario, the Renderer application is hosted locally and points to a remote Sitefinity CMS instance – for example, hosted on Azure App Services or on a remote IIS instance.
    This way, the developer is enabled to work with the latest database from the live, staging, or development environment, and preview the changes.

Domains in your license file

  • For the mixed scenario you must have added the localhost domain to your Sitefinity license
  • For the cloud scenario you must have added all the domains of the live Renderer website to your Sitefinity license

RECOMMENDATION: We strongly recommend not hooking a local Renderer to a live Sitefinity CMS instance. Because any changes to the live environment will not be applied to the local development environment, thus, breaking the Continuous delivery process and causing malfunction to any live Renderer.

Setup the Renderer

Applicable to: Cloud and Mixed scenario, Azure App Services and Amazon EC2

For both cloud and mixed hosting, you need to first setup the renderer application in the following way:

  1. Create the ASP.NET Core web application.
  2. Install the NuGet packages.
  3. Configure the .NET Core Renderer.
  4. Host the renderer on Azure App Services or Amazon EC2.

Configure Sitefinity CMS

Applicable to: Cloud and Mixed scenario, Azure App Services and Amazon EC2

The following procedure describes how to configure Sitefinity CMS for the cloud and the mixed hosting scenarios for both Azure App Services and Amazon EC2.

After creating and configuring your ASP.NET Core application, you have to configure your Sitefinity CMS. Perform the following:

  1. In Sitefinity CMS backend, navigate to Administration » Web services.
  2. Open the Default web service.
  3. Under Who can access the content by this service?, select Everyone.
  4. Save your changes.
  5. If the domain that Sitefinity CMS is hosted on is not part of the license and you are using the OpenID authentication protocol, perform the following:
    1. In the treeview, click SecurityTokenService » IdentityServer.
    2. In Identity server host header valid value input field, enter the live domain of Sitefinity CMS.
    3. Save your changes.

Configure the Renderer for Azure App Services

Applicable to: Cloud and Mixed scenario, Azure App Services only

If your project is hosted on Azure App Services, you need to make some specific settings, so that your Renderer application can communicate with Sitefinity CMS.

You need to make changes to the appSettings.json file of your Renderer application.

If you are using a domain for Sitefinity CMS other than the default azure domain, specified as yoursite.azurewebsites.net, open the appSettings.json file of the Renderer application and set the HostHeaderName settings to equal X-Original-Host by adding the following:

Configure Sitefinity CMS for Azure App Services

Applicable to: Cloud and Mixed scenario, Azure App Services only

If your project is hosted on Azure App Services, you need to make some specific settings, so that your Sitefinity CMS can communicate with the Renderer application.

In addition to the above procedures, perform the following:

  1. Set up a 64-bit process in the App Service paltform configuration.
    To do this, perform the following:
    1. In the Azure portal, click your service.
    2. Under Settings, click Configuration.
    3. Click General settings.
    4. In Platform dropdown box, select 64 Bit.
  2. Rewrite the X-Original-Host header sent from the Renderer to Host header.
    To do this, install an additional extension from the Kudu console in the following way:
    1. In the Azure portal, click your service.
    2. In the sidebar, under Development tools section, click Advanced Tools » Go.
    3. In the Kudo console, expand the Site extensions.
    4. Search for the Application Gateway Host Rewrite Module and follow the installation instructions.

Https considerations

There are four scenarios in which the two applications can be configured, but only three of them are supported. The only scenario which is not supported is when the Renderer is under HTTP and Sitefinity CMS under HTTPS, which leads to a downgrade in the protocol. The other three are supported:

ASP.NET Core Renderer Sitefinity CMS Supported
HTTP HTTP Yes
HTTPS HTTPS Yes
HTTPS HTTP Yes
HTTP HTTPS No

For more information, see Enforce HTTPS in ASP.NET Core in Microsoft documentation.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?