World is now on Opti ID! Learn more

Alexander Haneng
Jul 19, 2012
  12311
(5 votes)

EPiServer 7: There is already an open DataReader associated with this Command which must be closed first.

I ran into the following error on an EPiServer 7 Preview site today:

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

The problem is that EPiServer 7 requires that the MultipleActiveResultSets is set to true in the connection string.

 

ConnectionStrings.config:

<connectionStrings>
  <clear />
  <add name="EPiServerDB" 
       connectionString="Data Source=(local)\SQLEXPRESS;
         Initial Catalog=epi;
         Integrated Security=False;
         User ID=user;
         Password=pwd;
         MultipleActiveResultSets=True" 
       providerName="System.Data.SqlClient" />
</connectionStrings>

 

 

image

Jul 19, 2012

Comments

Eric
Eric Jun 5, 2013 04:17 PM

Awsome. Strange but this did not occur when I had the db localy on my machine but on a shared server. Still same problem with episerver cms 7 the released version.

Eric
Eric Jun 5, 2013 04:17 PM

deleted post

Ted Callander
Ted Callander Jun 9, 2014 11:17 PM

Thanks, solved my problem :)

Please login to comment.
Latest blogs
Commerce 14.41 delisted from Nuget feed

We have decided to delist version 14.41 of the Commerce packages as we have discovered a bug that prevents current carts to be saved into...

Shahrukh Ikhtear | Jul 8, 2025

How Optimizely SaaS CMS Isn’t Just Another Commodity

CMS platforms these days are becoming commoditised. The modelling of most systems lends itself to automation. Giving marketers more flexibility wit...

Chuhukon | Jul 4, 2025 |

How to Set Up CI/CD Pipeline for Optimizely Frontend Hosting Using GitHub Actions

As I promised in my previous blog post about getting started with Optimizely Frontend Hosting, today I’m delivering on that promise by sharing how ...

Szymon Uryga | Jul 2, 2025

Environment-specific badges in the Optimizely CMS

Step 1: Add Environment Info to the UI Create a custom UIDescriptor and a ComponentDefinition to inject a badge into the CMS UI. using EPiServer.Sh...

Rajveer Singh | Jul 1, 2025