ASP.NET Web Application (.NET Framework) - There is already an open DataReader associated with this Command which must be closed first

Add MultipleActiveResultSets=true to the provider part of your connection string (where Data Source, Initial Catalog, etc. are specified).


Example :

<connectionStrings>
    <add name="Context" connectionString="Data Source=localhost;Initial Catalog=DBName;User ID=username;Password=password;MultipleActiveResultSets=true" providerName="System.Data.SqlClient" />
</connectionStrings>