System.InvalidOperationException: There is already an open DataReader associated with this Command w

Posted by Sheonarayan under Error and Solution on 8/12/2014 | Points: 10 | Views : 930 | Status : [Administrator] | Replies : 0

Problem


I was getting below error when I was trying to access multiple LINQ queries in the ASP.NET MVC project.

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

Solution

The solution is simple.

Suffix MultipleActiveResultSets=true; to your database connection string in the web.config file.

:)

Regards,
Sheo Narayan
http://www.dotnetfunda.com



Responses

(No response found.)

Login to post response