Host Sitefinity CMS and the Renderer on the same IIS
The following procedure describes how to host both Sitefinity CMS and the ASP.NET Core Renderer applications on the same IIS instance.
PREREQUISITES: You must have installed Microsoft Visual C++ Redistributable.
Perform the following:
-
Create two websites in IIS - one for Sitefinity CMS and one for the ASP.NET Core Renderer.
-
Host Sitefinity CMS by performing procedure Run projects on IIS.
-
Host the ASP.NET Core Renderer on IIS by following Microsoft documentation » Publish an ASP.NET Core app to IIS.
-
Place the public domains of all of your Sitefinity CMS sites on the ASP.NET Core Renderer application.
-
Download the NuGet package Progress.Sitefinity.Cloud.AppGatewayHostRewriteModule.
-
Change the file extension from
.nupkgto.zipand extract the files. -
In the extracted folder, navigate to the
Contentfolder. -
Copy the
HostRewriteModule.dlland 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.
-
Open Internet Information Services (IIS) Manager.
-
At the top, select your server and click Modules.
-
Click Configure Native Modules » Register.
-
Set the name to
AppGatewayHostRewriteModule -
In Path, navigate to the
HostRewriteModule.dll, select it, and click OK. -
Ensure the checkbox next to
AppGatewayHostRewriteModuleis selected and click OK. -
Because both applications are on the same machine, set the Sitefinity CMS binding to
localhoston port 8080. -
Open the
appSettings.jsonof the ASP.NET Core Renderer application. -
In the
Sitefinityobject, add the property"HostHeaderName": "X-Original-Host" -
Update the
URLproperty to"http://localhost:8080" -
Save and close the
appSettings.json.