Can someone explain this? I have tried everything. This break down when i added contact form and meta data. Episode 10 Paul Seal
using Slimsy.DependencyInjection;
using Yggdrasila.Configuration;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddSlimsy()
.AddDeliveryApi()
.AddComposers()
.Build();
builder.Services.Configure<YggdrasilaConfig>(
builder.Configuration.GetSection(YggdrasilaConfig.SectionName));
WebApplication app = builder.Build();
await app.BootUmbracoAsync();
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseInstallerEndpoints();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
await app.RunAsync();
{
"$schema": "appsettings-schema.json",
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"System": "Warning"
}
}
},
"Umbraco": {
"CMS": {
"Global": {
"Id": "16a4fdbf-5fcb-4a2b-b321-7b469c8b8f78",
"SanitizeTinyMce": true
},
"Content": {
"AllowEditInvariantFromNonDefault": true,
"ContentVersionCleanupPolicy": {
"EnableCleanup": true
},
"LoginBackgroundImage": "/img/login-background-image.jpg"
},
"Unattended": {
"UpgradeUnattended": true
},
"Security": {
"AllowConcurrentLogins": false
},
"RichTextEditor": {
"CustomConfig": {
"style_formats": "[{\"title\":\"Paragraphs\",\"items\":[{\"title\":\"Normal\",\"block\":\"p\"},{\"title\":\"Lead\",\"block\":\"p\",\"attributes\":{\"class\":\"lead\"}}]},{\"title\":\"Headings\",\"items\":[{\"title\":\"h1\",\"block\":\"h1\"},{\"title\":\"h2\",\"block\":\"h2\"},{\"title\":\"h3\",\"block\":\"h3\"},{\"title\":\"h4\",\"block\":\"h4\"},{\"title\":\"h5\",\"block\":\"h5\"},{\"title\":\"h6\",\"block\":\"h6\"}]},{\"title\":\"Text Colours\",\"items\":[{\"title\":\"Primary\",\"inline\":\"span\",\"styles\":{\"color\":\"#1abc9c\"},\"attributes\":{\"class\":\"text-primary\"}},{\"title\":\"Secondary\",\"inline\":\"span\",\"styles\":{\"color\":\"#03203d\"},\"attributes\":{\"class\":\"text-secondary\"}},{\"title\":\"Success\",\"inline\":\"span\",\"styles\":{\"color\":\"#198754\"},\"attributes\":{\"class\":\"text-success\"}},{\"title\":\"Danger\",\"inline\":\"span\",\"styles\":{\"color\":\"#dc3545\"},\"attributes\":{\"class\":\"text-danger\"}},{\"title\":\"Warning\",\"inline\":\"span\",\"styles\":{\"color\":\"#ffc107\"},\"attributes\":{\"class\":\"text-warning\"}},{\"title\":\"Info\",\"inline\":\"span\",\"styles\":{\"color\":\"#0dcaf0\"},\"attributes\":{\"class\":\"text-info\"}},{\"title\":\"Light\",\"inline\":\"span\",\"styles\":{\"color\":\"#f8f9fa\"},\"attributes\":{\"class\":\"text-light\"}},{\"title\":\"Dark\",\"inline\":\"span\",\"styles\":{\"color\":\"#212529\"},\"attributes\":{\"class\":\"text-dark\"}},{\"title\":\"White\",\"inline\":\"span\",\"styles\":{\"color\":\"#ffffff\"},\"attributes\":{\"class\":\"text-white\"}}]}]"
}
}
}
},
"Slimsy": {
"WidthStep": 80,
"UseCropAsSrc": false,
"DefaultQuality": 70,
"Format": "",
"BackgroundColor": "",
"AppendSourceDimensions": true,
"EncodeCommas": true,
"AutoOrient": true
},
"uSync": {
"Settings": {
"ExportOnSave": "Settings"
}
},
"Yggdrasila": {
"EmailSettings": {
"From": "[email protected]",
"To": "[email protected]"
},
"SearchSettings": {
"PageSize": 1
}
}
}
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
@{
Layout = null;
}
<!DOCTYPE html>
<html lang="en">
<head>
@await Html.PartialAsync("metaData")
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
<!-- Font Awesome icons (free version)-->
<script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script>
<!-- Google fonts-->
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css" />
<!-- Core theme CSS (includes Bootstrap)-->
<link href="/css/styles.css" rel="stylesheet" asp-append-version="true" />
</head>
<body id="page-top">
<!-- Navigation-->
@await Html.PartialAsync("mainNavigation")
@RenderBody()
<!-- Footer-->
@await Html.PartialAsync("footer")
<!-- Portfolio Modals-->
@await Html.PartialAsync("models")
<!-- Bootstrap core JS-->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<!-- Core theme JS-->
<script src="/js/scripts.js" asp-append-version="true"></script>
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *-->
<!-- * * SB Forms JS * *-->
<!-- * * Activate your form at https://startbootstrap.com/solution/contact-forms * *-->
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *-->
<script src="https://cdn.startbootstrap.com/sb-forms-latest.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.3.2/lazysizes.min.js" integrity="sha512-q583ppKrCRc7N5O0n2nzUiJ+suUv7Et1JGels4bXOaMFQcamPk9HjdUknZuuFjBNs7tsMuadge5k9RzdmO+1GQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</body>
</html>
Hi @Yggdrasila2025 - the problem isn’t with your code, it’s your secrets.json file - both errors you’ve screenshotted indicate that the format of the data in there is invalid. Take a look at that and see if you can spot the error. Seems like you may have a ]
in there that’s not matched with an opening [
.
For reference: Safe storage of app secrets in development in ASP.NET Core | Microsoft Learn
Tnx for the answer:)
Here is my secrets.json:
{
"Umbraco": {
"CMS": {
"Global": {
"Smtp": {
"Host": "127.0.0.1",
"Port": 25,
"Username": "",
"Password": "",
"From": "[email protected]"
}
}
}
}
}
Do I need to download this? I dont see any errors at secrets.json?
dotnet add package Microsoft.Extensions.Configuration
dotnet add package Microsoft.Extensions.Configuration.UserSecrets
follow the guide - you shouldn’t need to install additional packages, but verify that you have secrets set up correctly according to the documentation (and verify the path of the secrets.json file that’s reported in the error).
Im new at this umbraco backoffice Take it easy
If i follow Paul Seal episode.10 at youtube, my site crash after contact form and meta data.
Im not sure if the code is correct or not, this is code from paul seal, but maybe I have placed something wrong?