Our monthly Virtual Happy Hour is happening this week, Fri Feb 23!

Try our conversational search powered by Generative AI!

intermittent foreign key error when editing


every now and again i start to get this error.

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_tblWorkContentProperty_tblPropertyDefinition". The conflict occurred in database "EPiServer", table "dbo.tblPropertyDefinition", column 'pkID'.

Once it starts happening, it keeps doing it until i run iisreset.


Does anyone know what is causing this?



Mar 04, 2013 12:44

I usually have this if the database is shared among multiple developers/environments and something changes in one (new page types, property etc).


Mar 04, 2013 12:59

Although a iisreset does seem to fix this we have found this can re-occur again - can you give us more details and what is causing this? also will it be fixed in the next release?


Jul 29, 2013 15:57

as it says above, if you see this, you may have more than one site setup on iis sharing the same database but with different models, properties, pagetypes etc

Aug 08, 2013 17:11

Old post but a new encounter.

We run a shared delevopment environment in our EPiServer "test"-site and i just raned into this problem. I reseted the IIS and then edited in EPiServer Edit-mode a text on a site which no one else has made any changes in and it appeared again. one of my colleagues has files checked out for editing purposes in Visual Studio which may cause the problem. But what will happen when i deploying the files on the live server? Will the problem persist or is it only bound to the development environment test site?


I deployed the release and the same error occured. However when i reseted the IIS it worked as it should.

Edited, Jul 02, 2015 13:32

I can confirm an IIS reset solved this problem for me as well (on FK_tblContent_tblContentType).


Jul 10, 2015 15:34

For me, iisreset does not help. Any other suggestions?

Jun 14, 2017 8:56

it was quite a while ago, but the solution is dont share a database across multiple environments, it just doesnt work and causes a bunch of issues

Jun 14, 2017 9:51
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.