Synchronize page content
2025/09/05 12:09 PM
I'm working with the local version of XbyK. Advanced license type, using example:
using Microsoft.Extensions.Hosting;
// ...
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
// Configures the development environment as the content sync source
if (builder.Environment.IsDevelopment())
{
builder.Services.Configure<ContentSynchronizationOptions>(options =>
{
options.Source.Enabled = true;
options.Source.Secret = "147283795efb915cf7bcbe207678764e";
options.Source.TargetUrl = "https://productiondomain.com";
});
}
// Configures the production environment as the content sync target
if (builder.Environment.IsProduction())
{
builder.Services.Configure<ContentSynchronizationOptions>(options =>
{
options.Target.Enabled = true;
options.Target.Secret = "147283795efb915cf7bcbe207678764e";
});
}
configured staging. But the Sync this page or Sync with all subpages action is missing on the pages in website channel application
Answers
Do you have the environment variables set correctly locally and where production is being hosted so that the code is ran correctly? The ASPNET_ENVIRONMENT variable should have Development, Staging or Production as a value for the builder.Environment.IsDevelopment() to work.
To answer this question, you have to login first.