Server Error in '/B2CAdmV1' Application.

The DELETE statement conflicted with the REFERENCE constraint "FK_B2C_Content_Res_B2C_Content". The conflict occurred in database "BigBlueCms", table "dbo.B2C_HtmlContent_Res", column 'HtmlContentId'.
The statement has been terminated.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: The DELETE statement conflicted with the REFERENCE constraint "FK_B2C_Content_Res_B2C_Content". The conflict occurred in database "BigBlueCms", table "dbo.B2C_HtmlContent_Res", column 'HtmlContentId'.
The statement has been terminated.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SqlException (0x80131904): The DELETE statement conflicted with the REFERENCE constraint "FK_B2C_Content_Res_B2C_Content". The conflict occurred in database "BigBlueCms", table "dbo.B2C_HtmlContent_Res", column 'HtmlContentId'.
The statement has been terminated.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +3335088
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +334
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4679
   System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) +1339
   System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +434
   System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +391
   Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) +139
   Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) +1045
   Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) +123
   Sf.Core.App.DBUpdate.Query.GarbageCollector.Invoke() +252
   Sf.Core.Setup.<>c.<Invoke>b__1_0(IStartupTask w) +54
   System.Collections.Generic.List`1.ForEach(Action`1 action) +101
   Sf.Core.Setup.StartupTasksHandler.Invoke(StartupTaskConfiguration configuration) +299


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4682.0