1. The query method is tested separately successfully, and the httpget interface is called successfully. However, if it is called by the httpput or httppost interface, an error [err] beginexecutereader requires the command to have a transaction when the connection assigned to the command is in a pending local transaction The Transaction property of the command has not been initialized.
Temporary processing method: using (idbconnection = dbconnection){
…connection.QueryAsync<T>…
}
Change to
DbConnection.QueryAsync< T>
2. If the above method is still unsuccessful, add the [unitofwork (false, isolationlevel. Readcommitted)] attribute to the httppost interface of the controller layer.
Similar Posts:
- AOP Configuration Services error: javax.persistence.TransactionRequiredException: no transaction is in progress
- Block Wild Pointer crash: Thread 1:EXC_BAD_ACCESS(code=1,address=0x10)
- [Solved] Upload Files Request processing failed;nested exception is org.springframework.web.multipart.MultipartException:Failed to parse multipart servlet request;multipart/form-data request failed.(**No permission**)
- Spring @Async interrupt/Unable to acquire JDBC Connection
- CentOS about “running Yum complete transaction first”
- iOS Presenting view controllers on detached view controllers is discouraged
- [Solved] ConnectionPoolTimeoutException: Timeout waiting for connection from pool
- [Solved] Spring introduces the properties variable Error: org.springframework.beans.TypeMismatchException…
- [Solved] Access denied for user ‘Administrator’@’localhost’ (using password: YES)
- [Solved] Sping controller Receives list entity parameter Error: nested exception is java.lang.IndexOutOfBoundsException: Index: 256, Size: 256