EF sqlite3 reports "System. Data. Entity. Core. EntityException: An error occurred while starting the transaction on the provider connection. For more information, see internal exceptions .,
Problem: sqlite3 database operation error using ef framework
Cause: the database file has no access permission.
Solution: You can add the Everyone user permission to the access permission of the folder where the database file is located.
Error: "System. Data. Entity. Core. EntityException: An error occurred while starting the transaction on the provider connection. For more information, see internal exceptions. ---> System. data. SQLite. SQLiteException: attempt to write a readonly database \ r \ nattempt to write a readonly database \ r \ n in System. data. SQLite. SQLite3.Reset (SQLiteStatement stmt) \ r \ n in System. data. SQLite. SQLite3.Step (SQLiteStatement stmt) \ r \ n in System. data. SQLite. SQLiteDataReader. nextResult () \ r \ n in System. data. SQLite. SQLiteDataReader .. ctor (SQLiteCommand cmd, CommandBehavior behave) \ r \ n in System. data. SQLite. SQLiteCommand. executeReader (CommandBehavior behavior) \ r \ n in System. data. SQLite. SQLiteCommand. executeNonQuery (CommandBehavior behavior) \ r \ n in System. data. SQLite. SQLiteCommand. executeNonQuery () \ r \ n in System. data. SQLite. SQLiteTransaction. begin (Boolean deferredLock) \ r \ n in System. data. SQLite. SQLiteTransactionBase .. ctor (SQLiteConnection connection, Boolean deferredLock) \ r \ n in System. data. SQLite. SQLiteTransaction .. ctor (SQLiteConnection connection, Boolean deferredLock) \ r \ n in System. data. SQLite. SQLiteConnection. beginDbTransaction (IsolationLevel isolationLevel) \ r \ n in System. data. common. dbConnection. beginTransaction (IsolationLevel isolationLevel) \ r \ n in System. data. entity. infrastructure. interception. dbConnectionDispatcher. <BeginTransaction> B _ 0 (DbConnection t, BeginTransactionInterceptionContext c) \ r \ n in System. data. entity. infrastructure. interception. internalDispatcher '1. dispatch [TTarget, TInterceptionContext, TResult] (TTarget target, Func '3 operation, TInterceptionContext interceptionContext, Action '3 executing, Action '3 executed) \ r \ n in System. data. entity. infrastructure. interception. dbConnectionDispatcher. beginTransaction (DbConnection connection, BeginTransactionInterceptionContext interceptionContext) \ r \ n in System. data. entity. core. entityClient. entityConnection. <> c _ DisplayClass6. <BeginDbTransaction> B _ 4 () \ r \ n in System. data. entity. infrastructure. defaultExecutionStrategy. execute [TResult] (Func '1 operation) \ r \ n in System. data. entity. core. entityClient. entityConnection. beginDbTransaction (IsolationLevel isolationLevel) \ r \ n --- end of internal exception stack trace --- \ r \ n in System. data. entity. core. entityClient. entityConnection. beginDbTransaction (IsolationLevel isolationLevel) \ r \ n in System. data. entity. core. entityClient. entityConnection. beginTransaction () \ r \ n in System. data. entity. core. objects. objectContext. executeInTransaction [T] (Func '1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) \ r \ n in System. data. entity. core. objects. objectContext. saveChangesToStore (SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) \ r \ n in System. data. entity. core. objects. objectContext. <> c _ DisplayClassb. <SaveChangesInternal> B _ 8 () \ r \ n in System. data. entity. infrastructure. defaultExecutionStrategy. execute [TResult] (Func '1 operation) \ r \ n in System. data. entity. core. objects. objectContext. saveChangesInternal (SaveOptions options, Boolean executeInExistingTransaction) \ r \ n in System. data. entity. core. objects. objectContext. saveChanges (SaveOptions options) \ r \ n in the System. data. entity. internal. internalContext. saveChanges () \ r \ n in System. data. entity. internal. lazyInternalContext. saveChanges () \ r \ n in System. data. entity. dbContext. saveChanges () \ r \ n in APPAPI. method. medToken. userlogtailken (String account )",