.net WPF and SQL Server CE crashing

0

I have an application in .net WPF that crashes randomly giving me the following errors:

Exception from HRESULT: 0x88980406 at System.Windows.Media.Composition.DUCE.Channel.SyncFlush() at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet) at System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam) at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)

Not enough storage is available to complete this operation. at System.Data.SqlServerCe.SqlCeConnection.ProcessResults(Int32 hr) at System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent) at System.Data.SqlServerCe.SqlCeConnection.Open() at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) OuterException The underlying provider failed on Open. at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) at System.Data.EntityClient.EntityConnection.Open() at System.Data.Objects.ObjectContext.EnsureConnection() at System.Data.Objects.ObjectQuery1.GetResults(Nullable1 forMergeOption)

Typically I get a number of the first error for a couple hours before I get the second repeatedly. It freeze up the whole application but when I get in to check after he customer calls me there is still a decent amount of memory left of the system. Any help would be much appreciated.

c#
.net
wpf
sql-server-ce
asked on Stack Overflow Jan 9, 2016 by user963091 • edited Jan 9, 2016 by marc_s

1 Answer

0

Virus scanner? If you use SQL CE 4.0 SP1, you can add Open retry logic to your connection string

answered on Stack Overflow Jan 9, 2016 by ErikEJ

User contributions licensed under CC BY-SA 3.0