Millhorn
Millhorn

Reputation: 3166

ASP.NET core Sitefinity application not running

I'm working on a Sitefinity ASP.NET application. I've been following the documentation explicitly from https://www.progress.com/documentation/.... Everything seemed to be going great until I ran the renderer.

Aside from the setup/installation of the app itself, the following files had to be updated.

launchSettings.json, Program.cs and appsettings.json

launchSettings.json

{
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:9296",
      "sslPort": 44337
    }
  },
  "profiles": {
    "Renderer": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "applicationUrl": "https://localhost:5001;http://localhost:5000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}

Program.cs

using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;

using Progress.Sitefinity.AspNetCore;
using Progress.Sitefinity.AspNetCore.FormWidgets;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
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();

The issue seems to be with the following file. The documentation (linked above) says to paste in the code below:

appsettings.json

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*",
  "Sitefinity": {
    "Url": "https://yoursitefinitywebsiteurl",
    "WebServicePath": "api/default"
  }
}

When I try to run the application, this is what I get, which is expected, but when I change out the Sitefinity >> Url value (https://localhost:5001, http://localhost:5000), but I still get a dead page. enter image description here

Any idea what I might be doing wrong?

Upvotes: 0

Views: 283

Answers (1)

Veselin Vasilev
Veselin Vasilev

Reputation: 3793

This setting:

"Sitefinity": { "Url": "https://yoursitefinitywebsiteurl",..

should point to the URL of your standard Sitefinity web site (SitefinityWebApp).

Have you setup one in IIS?

Does it run?

This video might be helpful: https://www.youtube.com/watch?v=PakWXc3Efg8 on how to set it up using the CLI.

Upvotes: 1

Related Questions