Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tom C 87 posts 222 karma points
    May 03, 2017 @ 08:14
    Tom C
    0

    Upgraded from 7.5.9 to 7.6

    getting lots of these errors;

    "There is already an open DataReader associated with this Command which must be closed first"

    anyone else?

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 03, 2017 @ 08:29
    Dave Woestenborghs
    0

    Hi Tom,

    Can you post the full log where you get this error ?

    Dave

  • Tom C 87 posts 222 karma points
    May 03, 2017 @ 08:36
    Tom C
    0

    I was getting it from doing this, the second line threw the error. Have recoded to get rid of the DynamicNode and it works fine.

     dynamic Item = new umbraco.MacroEngines.DynamicNode( NodeId );
                   myvalue = tem.PropertyXXX
    

    Umbraco.Core.Persistence.UmbracoDatabase : Exception (83700205). System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first. at System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand command) at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command) at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior) in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\Data\ProfiledDbCommand.cs:line 248 at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>cDisplayClass4.3() at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func1 func) at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteReaderWithRetry(IDbCommand command, RetryPolicy cmdRetryPolicy, RetryPolicy conRetryPolicy) at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteReaderWithRetry(IDbCommand command, RetryPolicy retryPolicy) at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteReaderWithRetry(IDbCommand command) at Umbraco.Core.Persistence.Database.

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    May 09, 2017 @ 21:05
    Alex Skrypnyk
    0

    Hi Tom

    Try do not use dynamics at all.

    Use IPublishedContent instead of DynamicNode - https://our.umbraco.org/documentation/reference/querying/ipublishedcontent/

    Alex

  • Tom C 87 posts 222 karma points
    May 11, 2017 @ 14:12
    Tom C
    0

    Hi Alex,

    yep i don't use them any more, it was code i'd written some time ago; but that is missing the point a bit, it shouldn't be throwing exceptions like that, it indicates there is a bug somewhere.

    best, tom

Please Sign in or register to post replies

Write your reply to:

Draft