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 can run on the local user machine, but be hosted under different ports –  for example, localhost:1234 for Sitefinity CMS and localhost:4321 for the Renderer application.
  • Cloud
    In this scenario, both applications can 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.
    This way, the developer is enabled to work with the latest database from the live, staging, or development environment, and preview the changes.

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.

Configure the cloud scenario

Use the following procedure to host Sitefinity CMS and the Renderer application on Azure App Services:

  1. Open the web.config file of your Sitefinity CMS.
  2. Inside the <system.webServer> config element, add the following rewrite rule:
  3. Save and close the web.config file.
  4. To add the Renderer as a known origin, open your Sitefinity CMS and navigate to Administration » Settings » Advanced.
  5. In the treeview, expand Authentication » SecurityTokenService » IdentityServer » Clients » sitefinity.
  6. Click RedirectUris » Create new.
  7. In RedirectUri input field, enter https://<YourRendererAppDomain>/singin-oidc
  8. Save your changes.
  9. Click Allowed cors origins » Create new.
  10. In AllowedCorsOrigin input field, enter https://<YourRendererAppDomain>
  11. Save your changes.
  12. If you are using a domain for Sitefinity CMS other than the default azure domain, specified as yoursite.azurewebsites.net, set the HostHeaderNameode settings in the app.settings file to equal X-Original-Host

Configure the mixed scenario

Use the following procedure to host Sitefinity CMS in Azure App Services and the Renderer application locally:

1. Enable local development with a remote azure instance by setting the following configuration in the AuthenticationConfig file. Add the following redirect url 

  1. To add the Sitefinity CMS as a known origin, open your Renderer application and navigate to Administration » Settings » Advanced.
  2. In the treeview, expand Authentication » SecurityTokenService » IdentityServer » Clients » sitefinity.
  3. Click RedirectUris » Create new.
  4. In RedirectUri input field, enter https://localhost:5000/singin-oidc
  5. Save your changes.
  6. Click Allowed cors origins » Create new.
  7. In AllowedCorsOrigin input field, enter https://localhost:5000
  8. Save your changes.
  9. If the domain that Sitefinity CMS is hosted on is not part of the license, prform 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.
  10. Save your changes.

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.


Was this article helpful?

Next article

Configure output cache