I have Kentico 12 MVC Application, I'm trying delete media file from media library, The file size is 400MB, clicking delete button beside the file freezes the site for about 2 or 3 minutes then nothing happens, the file still exists and I can download it.
in event lg there is a new log in event logs with Event code = "DELETEOBJ" and description = "Delete Media file 'test_big_file'", and after a while an error appear
Message: Thread was being aborted.
Exception type: System.Threading.ThreadAbortException
Stack trace:
at SNIReadSyncOverAsync(SNI_ConnWrapper* , SNI_Packet** , Int32 )
at SNINativeMethodWrapper.SNIReadSyncOverAsync(SafeHandle pConn, IntPtr& packet, Int32 timeout)
at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)
at CMS.DataEngine.GeneralConnection.RunQuery(QueryParameters query)
at CMS.DataEngine.GeneralConnection.RunQueryWithRetry(QueryParameters query, Int32 retryCount)
at CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query, Int32& totalRecords)
at CMS.DataEngine.DataQueryBase
1.GetDataFromDBInternal()
at CMS.DataEngine.DataQueryBase1.GetDataFromDB()
at CMS.DataEngine.DataQueryBase
1.GetData()
at CMS.DataEngine.SimpleDataClass.Insert(Boolean initId)
at CMS.DataEngine.AbstractInfoBase1.InsertData()
at CMS.DataEngine.AbstractInfoProvider
3.SetInfo(TInfo info)
at CMS.Synchronization.ObjectVersionManager.CreateVersion(GeneralizedInfo infoObj, Int32 userId, Boolean forceVersion)
at CMS.Synchronization.ObjectVersionManager.EnsureDeletedVersion(GeneralizedInfo infoObj)
at CMS.Synchronization.Synchronization.CreateVersion(LogObjectChangeSettings settings)
at CMS.Synchronization.SynchronizationActionManager.ExecuteActions(LogObjectChangeSettings settings)
at CMS.Synchronization.SynchronizationHelper.<>c__DisplayClass16_0.b__0()
at CMS.Helpers.AbstractStockHelper1.ExecuteWithEmptyStorage(Action action, String key, Boolean caseSensitive)
at CMS.Synchronization.SynchronizationHelper.LogObjectChange(LogObjectChangeSettings settings)
at CMS.Synchronization.SynchronizationHandlers.Delete_Before(Object sender, ObjectEventArgs e)
at CMS.Base.AbstractHandler.CallEventHandler[TArgs](EventHandler
1 h, TArgs e)
at CMS.Base.AbstractHandler.Raise[TArgs](String partName, List1 list, TArgs e, Boolean important)
at CMS.Base.AdvancedHandler
2.RaiseBefore(TArgs e)
at CMS.Base.AdvancedHandler2.RaiseBefore(TArgs e)
at CMS.Base.AdvancedHandler
2.RaiseBefore(TArgs e)
at CMS.Base.AdvancedHandler2.StartEvent(TArgs e, Boolean allowEvent)
at CMS.DataEngine.ObjectHandler.StartEvent(BaseInfo obj)
at CMS.DataEngine.AbstractInfoBase
1.DeleteData()
at CMS.DataEngine.AbstractInfoProvider`3.DeleteInfo(TInfo info)
at CMS.MediaLibrary.MediaFileInfoProvider.DeleteMediaFileInfoInternal(MediaFileInfo infoObj)
at CMSModules_MediaLibrary_Controls_MediaLibrary_MediaLibrary.PerformDeleteMediaFile(String filePath) in D:\Agents\KENTICO-01_work\630\s\src\backend\Presentation\CMS\CMSModules\MediaLibrary\Controls\MediaLibrary\MediaLibrary.ascx.cs:line 1912
This does not happen with small files.