在实体框架中使用MySql时,我遇到了以下错误。我已经在EntityConnectionStringBuilder的连接字符串上将默认连接超时设置为300000。如何在实体框架中解决这个问题?
Unhandled Exception: System.Data.EntityCommandExecutionException: An
error occurred while reading from the store provider's data reader. See the
inner exception for details. ---> MySql.Data.MySqlClient.MySqlException: Fatal
error encountered during data read. ---> MySql.Data.MySqlClient.MySqlException:
Reading from the stream has failed. ---> System.IO.EndOfStreamException: Attempted
to read past the end of the stream.更新:如何为ado.net实体框架设置net_read_timeout?
发布于 2012-10-18 03:26:15
像这样
data.Database.ExecuteSqlCommand("set net_write_timeout=99999; set net_read_timeout=99999");发布于 2012-08-22 22:43:08
内部异常说明了什么?
未处理的异常: System.Data.EntityCommandExecutionException并不指向超时错误,它可以是像在EF查询中使用的需要可为空的int一样简单的东西。
你能把问题提交给吗?
干杯
https://stackoverflow.com/questions/12075506
复制相似问题