SqlException (0x80131904): "the connection was reestablished and the rowcount in the first request is not available"

I am getting an exception in my ASP.NET MVC application, the error does not always happen, but when it does, this is the error I get when trying to read information from the database

System.Data.SqlClient.SqlException (0x80131904): The connection was reestablished and the rowcount in the first request was not available. please do another query to get a valid line number.

The error only occurs in the publish version

I am using a DB from Windows Azure and pretending to authenticate

+3


source to share


1 answer


I resolved this error message:

SET NOCOUNT ON;

      



before executing a query requiring a follow-up @@ ROWCOUNT.

+3


source







All Articles