Host Sitefinity CMS on a separate IIS server for local development

Overview

This article explains how to host Sitefinity CMS on an IIS instance and make it accessible to the ASP.NET Core Renderer application. You can use this setup for local development purposes.

PREREQUISITES: You must comply with the following:
  • Your Sitefinity CMS application must be hosted on an IIS instance.
    For more information, see Run projects on IIS.
  • You must have installed Microsoft Visual C++ Redistributable.

After you have hosted your Sitefinity CMS on an IIS, depending on the port setup, you can do the following:

Scenario 1: Sitefinity CMS listens to unique port

When Sitefinity CMS is the only running application that listens to a specific port, such as 80 or 433, you can configure the Renderer application in one of the following ways:

  • In the appsettings.json file of the Renderer, modify the URL to be the IP address of the machine that hosts the Sitefinity CMS.
  • Add a binding in your hosts file that has a custom domain pointing to the IP address of the machine that hosts the Sitefinity CMS. Afterwards, use this binding in the appsettings.json file of the Renderer application.

Scenario 2: Sitefinity CMS shares a port

When Sitefinity CMS is hosted alongside other applications on the same port, the applications are differentiated by their domain names.

NOTE: The following procedure assume that Sitefinity CMS is hosted with domain name mysitefinity.com, under the default ports – 80 and 443.

  1. Download the NuGet package Progress.Sitefinity.Cloud.AppGatewayHostRewriteModule.
  2. Change the file extension from .nupkg to .zip and extract the files.
  3. In the extracted folder, navigate to the Content folder.
  4. Copy the HostRewriteModule.dll and paste in a dedicated folder.

    NOTE: The folder must to be accessible by the IIS. The file must remain in this folder for as long as the extension is used. Deleting the file or its folder can cause issues.

  5. Open Internet Information Services (IIS) Manager.
  6. At the top, select your server and click Modules.
  7. Click Configure Native Modules » Register.
  8. Set the name to AppGatewayHostRewriteModule
  9. In Path, navigate to the HostRewriteModule.dll, select it, and click OK.
  10. Ensure the checkbox next to AppGatewayHostRewriteModule is selected and click OK.
  11. Because both applications are on the same machine, set the Sitefinity CMS binding to localhost on port 8080.
  12. Open the appSettings.json of the ASP.NET Core Renderer application.
  13. In the Sitefinity object, add the property "HostHeaderName": "X-Original-Host"
  14. Update the URL property to mysitefinity.com
  15. Save and close the appSettings.json.

NOTE: You can add a binding in your hosts file to the same domain - mysitefinity.com.
The binding must point to the IP Address of your IIS instance. Then, you use that binding in the appsettings.json file of the Renderer.

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?