Host Sitefinity CMS and the .NET Core Renderer on the same IIS

The following procedure describes how to host both Sitefinity CMS and the .NET Core Renderer applications on the same IIS instance.

Perform the following:

  1. Create two websites in IIS - one for Sitefinity CMS and one for the .NET Core Renderer.
  2. Host Sitefinity CMS by performing procedure Run projects on IIS.
  3. Host the .NET Core Renderer on IIS by following Microsoft documentation » Publish an ASP.NET Core app to IIS.
  4. Place the public domains of all of your Sitefinity CMS sites on the .NET Core Renderer application.
  5. Open the web.config file of your Sitefinity CMS.
  6. Inside the <system.webServer> config element, add the following rewrite rule:
  7. Save and close the web.config.
  8. In the IIS, allow the HTTP_HOST server variable on the Sitefinity CMS application in the following way:
    1. In the Sites dropdown, select the Sitefinity CMS application.
    2. Under HTTP Features, click URL Rewrite.
    3. In the right sidebar, click View Server Variables » Add.
    4. For the name of the variable, enter HTTP_HOST and click OK.
      It appears in the list of allowed variables with Entry Type set to Local.
    5. Because both applications are on the same machine, set the Sitefinity CMS binding to localhost on port 8080.
  9. Open the appSettings.json of the .NET Core Renderer application.
  10. In the Sitefinity object, add the property "HostHeaderName": "X-Original-Host"
  11. Update the URL property to "http://localhost:8080"
  12. Save and close the appSettings.json.

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?

Next article

Configure output cache