Created
October 25, 2024 21:49
-
-
Save sitefinitySDK/b41b13ade1627f1a8bd70a22428facd5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Builder; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Hosting; | |
using Progress.Sitefinity.AspNetCore; | |
using Progress.Sitefinity.AspNetCore.FormWidgets; | |
using Progress.Sitefinity.Renderer.Designers; | |
using all_properties.Extensibility; | |
var builder = WebApplication.CreateBuilder(args); | |
// Add services to the container. | |
builder.Services.AddSitefinity(); | |
builder.Services.AddViewComponentModels(); | |
builder.Services.AddFormViewComponentModels(); | |
builder.Services.AddSingleton<IPropertyConfigurator, ExternalChoicePropertyConfigurator>(); | |
var app = builder.Build(); | |
if (!app.Environment.IsDevelopment()) | |
{ | |
app.UseExceptionHandler("/Error"); | |
app.UseHsts(); | |
} | |
app.UseStaticFiles(); | |
app.UseRouting(); | |
app.UseSitefinity(); | |
app.Run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment