Close

An error occurred while executing the command definition. See the inner exception for details.

edcorusa
12 years ago
#358 Quote
Avatar
  • 31
Not sure what is wrong? This is what I am getting in the log.
Brian Weston
EDCOR Electronics Corporation
www.edcorusa.com
edcorusa
12 years ago
#359 Quote
Avatar
  • 31
System.Data.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first. at System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand command) at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command) at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) --- End of inner exception stack trace --- at
Brian Weston
EDCOR Electronics Corporation
www.edcorusa.com
edcorusa
12 years ago
#360 Quote
Avatar
  • 31
System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues) at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() at System.Data.Entity.Internal.Linq.InternalQuery`1.GetEnumerator() at System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerable<TResult>.GetEnumerator() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at SevenSpikes.Nop.Services.Catalog.SpecificationAttributeService7Spikes.() at Nop.Core.Caching.CacheExtensions.Get[T](ICacheManager cacheManager, String key, Int32 cacheTime, Func`1 acquire) in F:\Projects\EDCORUSA230\Libraries\Nop.Core\Caching\Extensions.cs:line 23 at Nop.Core.Caching.CacheExtensions.Get[T](ICacheManager cacheManager, String key, Func`1 acquire) in F:\Projects\EDCORUSA230\Libraries\Nop.Core\Caching\Extensions.cs:line 12 at SevenSpikes.Nop.Services.Catalog.SpecificationAttributeService7Spikes.GetSpecificationAttributeOptionsDictionary() at SevenSpikes.Nop.Services.Helpers.SpecificationFilterOptionsHelper.() at SevenSpikes.Nop.Services.Helpers.SpecificationFilterOptionsHelper..(SpecificationFilterDTO ) at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate) at SevenSpikes.Nop.Services.Helpers.SpecificationFilterOptionsHelper.(Product , IDictionary`2 , IList`1 ) at 
Brian Weston
EDCOR Electronics Corporation
www.edcorusa.com
edcorusa
12 years ago
#361 Quote
Avatar
  • 31
SevenSpikes.Nop.Services.Helpers.SpecificationFilterOptionsHelper.GetProductsForSpecificationFiltersAndDetermineAvailableSpecificationOptionsForLaterRerieval(IQueryable`1 query, SpecificationFilterModelDTO specifiationFilterModelDTO) at SevenSpikes.Nop.Services.Helpers.FiltersAvailabilityHelper.FilterProductsAndDetermineAvailableFiltersForLaterRetrieval(IQueryable`1 products, Nullable`1 featuredProducts) at SevenSpikes.Nop.Services.Catalog.ProductService7Spikes.SearchProducts(Int32 categoryId, Int32 manufacturerId, Nullable`1 featuredProducts, Nullable`1 priceMin, Nullable`1 priceMax, Int32 productTagId, String keywords, Boolean searchDescriptions, Int32 languageId, SpecificationFilterModelDTO specifiationFilterModelDTO, AttributeFilterModelDTO attributeFilterModelDTO, ManufacturerFilterModelDTO manufacturerFilterModelDTO, ProductSortingEnum orderBy, Int32 pageIndex, Int32 pageSize, Boolean includeProductsFromSubcategories, Boolean showHidden) at SevenSpikes.Nop.AjaxFilters.Controllers.Catalog7SpikesController.GetFilteredProducts(Int32 categoryId, PriceRangeFilterModel7Spikes priceRangeFilterModel7Spikes, SpecificationFilterModel7Spikes specificationFiltersModel7Spikes, AttributeFilterModel7Spikes attributeFiltersModel7Spikes, ManufacturerFilterModel7Spikes manufacturerFiltersModel7Spikes, CatalogPagingFilteringModel pagingFilteringModel) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.
Brian Weston
EDCOR Electronics Corporation
www.edcorusa.com
edcorusa
12 years ago
#362 Quote
Avatar
  • 31
<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) at System.Web.Mvc.Controller.ExecuteCore() at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5() at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0() at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End() at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d() at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 
Brian Weston
EDCOR Electronics Corporation
www.edcorusa.com
edcorusa
12 years ago
#363 Quote
Avatar
  • 31
Sorry for all the posts, but I could not copy it all in one. I think it is something to do with the Ajax filer as it show up when some tries to use it. They do not have a problem just the error show up in the log. I am running NopCommerce 2.3.
Brian Weston
EDCOR Electronics Corporation
www.edcorusa.com
Support
12 years ago
#364 Quote
Avatar
  • Moderator
  • 1044
edcorusa wrote:
Sorry for all the posts, but I could not copy it all in one. I think it is something to do with the Ajax filer as it show up when some tries to use it. They do not have a problem just the error show up in the log. I am running NopCommerce 2.3.


Hi edcorusa,

Could you make sure that the connection string that is in App_Data\Settings.txt file contains MultipleActiveResultSets=True ?

Best Regards,
Nop-Templates Support Team
edcorusa
12 years ago
#365 Quote
Avatar
  • 31
I have added that code to the connection string. I will let you know. Thanks a lot for the quick reply.
Brian Weston
EDCOR Electronics Corporation
www.edcorusa.com
edcorusa
12 years ago
#369 Quote
Avatar
  • 31
Ok, I am still getting the error.

When you look at a category with a list of products, the filters are in the side menu. You may have two or three Specifications that you can filter by. If you click one filter it works fine, but if you click on another specification to filter by as well you get this error the the log and it does not filter by the second clicked filter.
Brian Weston
EDCOR Electronics Corporation
www.edcorusa.com
Support
12 years ago
#370 Quote
Avatar
  • Moderator
  • 1044
For the MultipleActiveResultSets=True setting to take effect the application needs to be restarted. Can you modify the Global.asax file, just add a space to it and save it. This is the best way to restart the application given the nopCommerce peculiarities.