This exception thrown while index view render:
"InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first."
This is index view :
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.pageGroup.GroupTitle)
</td>
<td>
@Html.DisplayFor(modelItem => item.Title)
</td>
<td>
@Html.DisplayFor(modelItem => item.ShortDescription)
</td>
<td>
@Html.DisplayFor(modelItem => item.Text)
</td>
<td>
@Html.DisplayFor(modelItem => item.ShowInSlider)
</td>
<td>
@Html.DisplayFor(modelItem => item.ImageName)
</td>
<td>
@Html.DisplayFor(modelItem => item.Visit)
</td>
<td>
@item.CreateData.ToShamsi();
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id=item.PageID }) |
@Html.ActionLink("Details", "Details", new { id=item.PageID }) |
@Html.ActionLink("Delete", "Delete", new { id=item.PageID })
</td>
</tr> }
and the exeption thrown in this line :
@Html.DisplayFor(modelItem => item.pageGroup.GroupTitle)
where is the problem ?
If you are confused, tell me to put the codes of the section you want
this is my connection string :
<connectionStrings>
<add name="MyCmsContext" connectionString="data source=.; initial catalog=MyCmsDB;persist security info=True; Integrated Security=True; " providerName="System.Data.SqlClient" MultipleActiveResultSets="true" />