Web Farm Configuration

Vishal Bhatt asked on February 6, 2025 08:40

I have two Kentico 13 .NET Core applications hosted on different domains, both sharing a single CMS application directory for their admin panels. In other words, a single CMS instance is used for managing both domains.

The issue occurs when uploading media files:

Uploading a media file from Application 1's admin panel syncs correctly. However, uploading a media file from Application 2's admin panel causes it to sync with Application 1 instead. The web farm is set to Automatic.

Has anyone encountered a similar issue, or is there a configuration I might be missing? Any insights would be greatly appreciated!

Recent Answers


Juraj Ondrus answered on February 7, 2025 05:24

I would recommend reviewing the documentation on web farm setup, making sure your web servers are configured OK and also, try reproducing the issue using an out of the box installation first.

0 votesVote for this answer Mark as a Correct answer

vasu yerramsetti answered on February 14, 2025 10:36

Ensuring Proper Web Farm Synchronization Across Multiple Domains Kentico’s Web Farm configuration needs adjustments to ensure that media files uploaded from either Application 1 or Application 2 sync correctly.

1. Ensure Proper Web Farm Configuration

  1. Go to Settings → Versioning & Synchronization → Web farm
  2. Set the Web farm mode to Manual instead of Automatic
  3. In Web farm servers, ensure that both applications are properly registered with unique names

2. Manually Register Each Front-End Server

  1. Navigate to Configuration → Web farms
  2. Ensure both applications are registered with correct domain names
  3. If necessary, manually add entries for both applications, ensuring they have unique names

3. Verify File System Storage Settings

  1. Go to Settings → Content → Media Libraries
  2. Ensure that both applications point to the correct shared media file storage (either local file system, Azure Blob Storage, or an external CDN)
  3. If the files are stored on the file system, both applications need proper access to the ~/wwwroot/media folder

4. Check Web Farm Task Processing

  1. Navigate to Web farm tasks in the Kentico Admin panel
  2. Look for any failed tasks related to media file synchronization
  3. If there are failed tasks, try manually running them to diagnose if the synchronization issue persists

5. Validate Cache Dependencies

Kentico caches data per application, so media files might not appear due to cache inconsistencies. Try:

  • Clearing the cache on both applications using CacheHelper.Clear();
  • Enabling Staging and Synchronization Logging to track the web farm tasks

6. Consider Using Kentico’s Blob Storage Provider

If your setup requires media files to be shared across multiple domains, an alternative is to store media in Azure Blob Storage or Amazon S3, ensuring both applications access the same media library.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.