Setup procedure

Overview

The following article describes how to setup Sitefinity CMS to work with a standalone ASP.NET Core application as renderer.

You first install Sitefinity NuGet packages in an ASP.NET Core application. This enables the application to render ASP.NET Core pages and to serve as a Sitefinity CMS proxy for all other types of pages, created with Sitefinity.

PREREQUISITES: To setup and run the Renderer application:
  • You must have installed ASP.NET Core SDK 3.1.3
  • You must have upgraded your Sitefinity CMS to version 13.0 or above.

Create the ASP.NET Core web application

You install the Renderer in a separate ASP.NET Core application. If you do not have one, create it in the following way:

  1. In Visual Studio, navigate to File » New » Project…
  2. Click ASP.NET Core Web Application » Next.
  3. In Project name, enter Renderer and click Create.
  4. Make sure ASP.NET Core 3.1 is selected and click Create.

Install the NuGet packages

In your Renderer application, you must install the provided NuGet packages:

  • Progress.Sitefinity.AspNetCore.nupkg
  • Progress.Sitefinity.AspNetCore.Widgets.nupkg

Perform the following:

  1. Save the provided NuGet packages in a folder on your computer.
  2. In Visual Studio, navigate to Tools » NuGet Package Manager » Package Manager Settings.
  3. Under NuGet Package Manager, click Package Sources.
  4. Add a new source, name it Sitefinity NuGet Repository, and, in Source field, enter https://nuget.sitefinity.com/nuget
  5. Click OK.
  6. Navigate to Tools » NuGet Package Manager » Manage NuGet Packages for Solution…
  7. In Package source dropdown, select Sitefinity NuGet Repository.
  8. Open the Browse tab, select Progress.Sitefinity.AspNetCore, and install it in project Renderer.
  9. Select Progress.Sitefinity.AspNetCore.Widgets and install it in project Renderer.

Configure the project

After you have created the project and installed the NuGet packages, you must configure it to connect it to Sitefinity CMS. In Visual Studio, perform the following:

  1. In the Solution Explorer on the right, select appSettings.json.
    Edit the file to add the Sitefinity-related configurations.

    The file should look in the following way:

  2. Select the Startup.cs file.
    Edit the file to add the Sitefinity-related configurations.

    The file should look in the following way:

  3. In the Solution Explorer on the right, expand Properties and select launchSettings.json.
  4. Find the object with property "commandName": "Project" and edit this object’s applicationUrl property.

    The property should look in the following way:
    "applicationUrl": "http://localhost:5000"

  5. In Visual Studio toolbar, expand the run button dropdown, and select the launch profile you just edited. 
    In your case it is named Renderer.
  6. Build your solution.

Configure Sitefinity CMS

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. Navigate to Administration » Settings » Advanced.
  6. In tree on the left, expand Authentication » SecurityTokenService » IdentityServer » Clients » sitefinity.
  7. Click RedirectUris » Create new.
  8. In the input field, enter http://localhost:5000/signin-oidc
  9. Save your changes.

Run the Renderer

To run the renderer, navigate to http://localhost:5000/Sitefinity.

Alternative setup procedure

You can also setup Sitefinity CMS to use the .NET Core Renderer without Visual Studio. You can do that using Sitefinity CLI.

To setup the .NET Core application, use the following video:

For Sitefinity CMS setup, use the following video:

Was this article helpful?

Next article

Hosting configurations