Showing posts with label Sql Azure. Show all posts
Showing posts with label Sql Azure. Show all posts

July 11, 2014

I have set up a website using Windows Azure and have created a sql database on azure but when I run the site, I get the error message "There is already an open DataReader associated with this Command". In my previous post, I showed how to resolve this issue with Entity Framework; however, even after setting the connection string correctly, that is adding 'MultipleActiveResultSets=True' did not fix the issue.

So, after few trials and errors, I figured that the connection string needs to be modified from within the website configuration in Azure portal as well. So,

  • Login to Azure portal,
  • Navigate to the website from the left hand panel,
  • Click on configure from the top menu,
  • Scroll to "Connection String" section towards the bottom of the screen,
  • Click to edit and add MultipleActiveResultSets=True;

That should be it. The issue should be resolved now. Enjoy.

Reference: Shahed Kazi at AspNetify.com