Foreign Key Constraint Issue on Inserts

  • Updated

When making updates to Episerver you get an error "The INSERT statement conflicted with the FOREIGN KEY constraint".

This is generally caused by either multiple web sites or multiple web environments (development, staging, integration, production, etc.) pointing to the same database. This setup is not a proper or supported setup. If you are hosting multiple sites or have multiple environments you will need to have a single database for each site/environment.