Set up appsettings.json
On this page
Step 2 of the full setup. Choose whether pages open in the Visual Builder and, for Client Craft, where the site keeps its connection secret.
This page is for websites you host yourself. A few settings live in the website's configuration (appsettings.json, environment variables or your host's settings). The first one applies only if you installed ClientCraft, which includes the Visual Builder. Everything else is optional unless the table says otherwise.
Before you start #
- The package is installed. See Install the package.
Step by step #
- 1ClientCraft only: choose whether the Visual Builder shows on pagesAfter installing, pages still open in Umbraco's own Content view. To have them open in the Visual Builder from the start, set
ActiveByDefault:1{2 "ClientCraft": {3 "VisualBuilder": {4 "ActiveByDefault": true5 }6 }7}Leave it out (or set
false) to keep Umbraco's editing until an administrator turns the builder on. This is only the starting value: once an administrator chooses in Settings › Visual Builder, that choice is saved in the site's database and wins overappsettings.json. You turn it on in step 5. - 2Choose a folder for the connection secretWhen you connect the site in step 4, Client Craft saves the site's credential on your server. It needs a folder that survives deployments and restarts. Without this setting, connecting stops with
secret_storage_not_configured.1{2 "uCRM": {3 "SecretStorage": {4 "Provider": "ProtectedFile",5 "Directory": "D:\\ClientCraftSecrets\\my-site",6 "PersistentVolumeConfirmed": true7 }8 }9}Directorymust be a full path outside the website folder, the deployment folder,wwwrootand the temp folder, and not a drive root. It is created with restricted permissions if it doesn't exist.PersistentVolumeConfirmed: trueis you confirming the folder is kept across deployments and restarts.ProtectionisWindowsCurrentUserby default, which only works on Windows. On Linux, or when several servers share the folder, use"Protection": "Certificate"withCertificateThumbprint(andCertificateStoreLocation, defaultCurrentUser) for a certificate that has a private key.
- 3Restart the siteSettings are read at start-up, so restart the site after changing them.
Other settings you can change #
| Setting | Package | What it does | Default |
|---|---|---|---|
ClientCraft:VisualBuilder:ActiveByDefault | ClientCraft, Visual Builder | Pages open in the Visual Builder before anyone has chosen | false |
uCRM:SecretStorage | ClientCraft, Core | Where the connection secret is kept (step 2) | none: required to connect |
ClientCraft:KnowledgeHub:CacheSeconds | ClientCraft, Core | How long published Knowledge Hub pages are cached on the site, 0 to 3600 seconds | 60 |
ClientCraft:LandingPages:Layout | ClientCraft, Core | The layout view landing pages render inside, for example ~/Views/Shared/_Layout.cshtml | The site root's master template, then a conventional layout |
uCRM section name comes from Client Craft's earlier product name. It is still the name the packages read.uCRM in appsettings.json committed to source control. Connecting from the backoffice in step 4 saves the credential in the storage above for you. Hand-configured keys are for advanced setups only; see Install the package.Advanced: set the connection by hand #
If you manage credentials yourself, put them in server configuration or a secret provider under the uCRM section. Never put them in content, appsettings.json committed to source control, or browser scripts.
TenantIdentifier and Tenant are accepted aliases of TenantId; if you set more than one, they must have the same value. CrmApiBaseUrl must be HTTPS (plain HTTP is only accepted for a loopback address during development).
uCRM is kept for compatibility with earlier installations. It does not mean you need the legacy uCRM package.What happens next #
Next step: Add Client Craft to your layout.
More detail: Turn the Visual Builder on for a site.