Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this article you will find:

...

Steps for Setting-up the Project

Prerequisite

...

Sitefinity CMS version 13.3.7600

...

In order to use Sitefinity .NET Core Render you will need to configure two projects -one for the CMS and one .NET Core project for the Renderer.

For more information on how to configure the .NET Core Render you can refer to the official documentation - https://www.progress.com/documentation/sitefinity-cms/overview-renderer

Prerequisite

Info
  1. Sitefinity CMS project

  2. Sitefinity .NET Core Renderer project

Steps to install the connector

  1. Install the Hawksearch NuGet package for the CMS project - Hawksearch.Sitefinity.Renderer

...

  1. *

  2. Install the NuGet package for the .NET Core project - Hawksearch.Renderer.UI

...

  1. *

  2. Build your projects

Steps to configure the .NET Core Renderer

  1. Edit the Startup.cs or Program.cs file of your .NET Core Renderer application and add Hawksearch to your services.

    The Startup.cs should look like this:

Code Block
languagec#
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Progress.Sitefinity.AspNetCore;
using Renderer.Hawksearch.UI.Infrastructure.Extensions;

namespace Renderer
{
    public class Startup
    {
        // This method gets called by the runtime. Use this method to add services to the container.
        // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddHawksearch();
            services.AddSitefinity();
            services.AddViewComponentModels();
        }

        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseStaticFiles();
            app.UseRouting();
            app.UseSitefinity();
            app.UseEndpoints(endpoints => { endpoints.MapSitefinityEndpoints(); });
        }
    }
}

Info

In Configure method add app.UseStaticFiles() before app.UseRouting()

Info

For .NET 7.0 Reference the Program.cs below

Code Block
languagec#
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Progress.Sitefinity.AspNetCore;
using Progress.Sitefinity.AspNetCore.FormWidgets;
using Renderer.Hawksearch.UI.Infrastructure.Extensions;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddHawksearch();
builder.Services.AddSitefinity();
builder.Services.AddViewComponentModels();
builder.Services.AddFormViewComponentModels();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
    app.UseDeveloperExceptionPage();
}
else
{
    app.UseExceptionHandler("/Error");
    app.UseHsts();
}

app.UseStaticFiles();
app.UseRouting();
app.UseSitefinity();

app.UseEndpoints(endpoints =>
{
    endpoints.MapSitefinityEndpoints();
});

app.Run();

Steps to configure the .NET Core widgets

...

Hawksearch Index Name is the name of the created index in the Hawksearch engine. You can obtain the index name from the Hawksearch Admin → Index Mappings backend page (your-website-url/Sitefinity/Administration/Indexmappings) Hawksearch Indexes column.

...