Product: Umbraco CMS Version: v17
During the upgrade process to Umbraco v17, duplicate URL aliases or incorrect configuration of moved packages can cause boot failures and site-wide routing issues.
Issue: Users upgrading to v17 may encounter two primary obstacles:
BootFailedException: An error stating "An item with the same key has already been added" during the unattended upgrade process, specifically within the
DocumentUrlAliasRepository.Persistent 404 Errors: After resolving boot issues, the front end returns a 404 "Page Not Found" error for all pages, even if the backoffice is accessible.
Solution:
1. Resolve Duplicate URL Aliases
If the upgrade fails with a BootFailedException, it is often due to case-insensitive duplicates in the umbracoUrlAlias property.
Identify Duplicates: Run the following SQL query to find nodes where multiple aliases normalize to the same value:
SELECT cv.nodeId, LOWER(LTRIM(RTRIM(value))) AS NormalizedAlias, COUNT(*) FROM umbracoPropertyData pd JOIN cmsPropertyType pt ON pd.propertyTypeId = pt.id JOIN umbracoContentVersion cv ON pd.versionId = cv.id CROSS APPLY STRING_SPLIT(pd.textValue, ',') WHERE pt.alias = 'umbracoUrlAlias' AND pd.textValue IS NOT NULL GROUP BY cv.nodeId, LOWER(LTRIM(RTRIM(value))) HAVING COUNT(*) > 1;
Manual Cleanup: Locate the affected nodes in the Umbraco Backoffice and ensure the "Short URL Alias" (or
umbracoUrlAlias) values are unique and do not contain case-sensitive duplicates (e.g., avoid having bothaoeandAOE).
2. Address Breaking Changes in v17 (The 404 Solution)
If you see the backoffice but the front end returns 404 errors, it is likely because you have missed steps in the v17 Breaking Changes documentation. Specifically:
Package Separation: In v17,
InMemoryAutomodels builder and Razor runtime compilation have moved into their own separate NuGet packages.Project File Cleanup: You must remove legacy settings related to these features from your
.csprojfile. Even if you don't useInMemoryAuto, legacy configuration left in the project file can interfere with view compilation.Intellisense and Views: Failing to remove these old settings can prevent views from rendering properly, causing the routing engine to fail and return a generic 404. After removing the legacy settings and installing the new packages, perform a clean and rebuild.
3. Verify Web Routing Configuration
Ensure your appsettings.json (or environment-specific JSON) contains a correctly formatted UmbracoApplicationUrl:
The URL must be fully qualified, including the scheme and a Top-Level Domain (TLD) (e.g.,
https://localhost:44370/orhttps://www.example.com/). Note thatlocalhostwithout a trailing slash or port can sometimes cause issues in v17 environments.
Article last update date: 15-05-2026
