Hi!
I am using SQL Server Compact via Entity Framework for my desktop application. It is multi threaded application that intensively reads and writes from/into database.
All works fine, but periodically I get the exception:
The underlying provider failed on Open. {"The database file cannot be found. Check the path to the database. [ Data Source = ]"}
What is strange that 'Data Source' in the exception specified as empty.
Stack trace:
в System.Data.Entity.Core.EntityClient.EntityConnection.Open()
в System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
в System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
в System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__5()
в System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation)
в System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
в System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
I tried to reproduce this exception by creating test application, that uses the same database and the same repositories to write and read from the database 10 times more intensively, but the tests were OK.
So, maybe anybody can suggest what can be the reason of the exception and how can I theoretically reproduce it?
Alexander