- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们的 Orchard 网站上经常随机出现以下错误。当在页面之间快速导航时,这种情况似乎最为普遍。日志中没有其他错误,因此我不确定如何找出根本原因。我们没有对 ODBC 或类似的东西做任何特殊的事情(这是 google 在搜索有关 Orchard 的错误时提出的)。
[TransactionException: The operation is not valid for the state of the transaction.]
System.Transactions.TransactionState.EnlistVolatile(InternalTransaction tx, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions, Transaction atomicTransaction) +45
System.Transactions.Transaction.EnlistVolatile(IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions) +159
NHibernate.Transaction.AdoNetWithDistributedTransactionFactory.EnlistInDistributedTransactionIfNeeded(ISessionImplementor session) +307
NHibernate.Impl.AbstractSessionImpl.EnlistInAmbientTransactionIfNeeded() +24
NHibernate.Impl.AbstractSessionImpl.CheckAndUpdateSessionStatus() +23
NHibernate.Impl.SessionImpl.CreateCriteria(Type persistentClass) +95
Orchard.ContentManagement.DefaultContentManager.GetManyImplementation(QueryHints hints, Action`2 predicate) in c:\Users\sebros\My Projects\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:302
Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options, QueryHints hints) in c:\Users\sebros\My Projects\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:140
Orchard.ContentManagement.ContentGetExtensions.Get(IContentManager manager, Int32 id, VersionOptions options, QueryHints hints) in c:\Users\sebros\My Projects\Orchard\src\Orchard\ContentManagement\ContentExtensions.cs:160
Orchard.Core.Settings.Services.SiteService.GetSiteSettings() in c:\Users\sebros\My Projects\Orchard\src\Orchard.Web\Core\Settings\Services\SiteService.cs:46
Orchard.Settings.CurrentSiteWorkContext.Get(String name) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Settings\CurrentSiteWorkContext.cs:13
Orchard.Environment.<>c__DisplayClass7`1.<FindResolverForState>b__2(IWorkContextStateProvider wcsp) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\WorkContextImplementation.cs:32
System.Linq.WhereSelectArrayIterator`2.MoveNext() +69
System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source, Func`2 predicate) +179
Orchard.Environment.WorkContextImplementation.FindResolverForState(String name) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\WorkContextImplementation.cs:32
System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) +64
Orchard.Environment.WorkContextImplementation.GetState(String name) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\WorkContextImplementation.cs:27
Orchard.WorkContext.get_CurrentSite() in c:\Users\sebros\My Projects\Orchard\src\Orchard\WorkContext.cs:52
Orchard.Widgets.Filters.WidgetFilter.OnResultExecuting(ResultExecutingContext filterContext) +1222
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +41
System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +22
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +257
System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +22
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +257
System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +22
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +187
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +346
System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__19() +30
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +19
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +10
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +52
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +28
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +15
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +52
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +28
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +15
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +28
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +52
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +28
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +15
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Mvc\Routes\ShellRoute.cs:162
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +875
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +234
和
[TransactionAbortedException: The transaction has aborted.]
at System.Transactions.TransactionStateAborted.CreateAbortingClone(InternalTransaction tx)
at System.Transactions.DependentTransaction..ctor(IsolationLevel isoLevel, InternalTransaction internalTransaction, Boolean blocking)
at System.Transactions.Transaction.DependentClone(DependentCloneOption cloneOption)
at System.Transactions.TransactionScope.SetCurrent(Transaction newCurrent)
at System.Transactions.TransactionScope.PushScope()
at System.Transactions.TransactionScope..ctor(TransactionScopeOption scopeOption, TransactionOptions transactionOptions)
at Orchard.Data.TransactionManager.Orchard.Data.ITransactionManager.Demand() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\TransactionManager.cs:line 37
at Orchard.Data.SessionLocator.For(Type entityType) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\SessionLocator.cs:line 31
at Orchard.ContentManagement.DefaultContentManager.GetManyImplementation(QueryHints hints, Action`2 predicate) in c:\Users\sebros\My Projects\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 301
at Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options, QueryHints hints) in c:\Users\sebros\My Projects\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 140
at Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options) in c:\Users\sebros\My Projects\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 111
at Orchard.ContentManagement.DefaultContentManager.Get(Int32 id) in c:\Users\sebros\My Projects\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 107
at Orchard.Security.Providers.FormsAuthenticationService.GetAuthenticatedUser() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Security\Providers\FormsAuthenticationService.cs:line 94
at Orchard.Security.CurrentUserWorkContext.<Get>b__0[T](WorkContext ctx) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Security\CurrentUserWorkContext.cs:line 13
at Orchard.Environment.WorkContextImplementation.<>c__DisplayClass7`1.<FindResolverForState>b__5() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\WorkContextImplementation.cs:line 37
at Orchard.Environment.WorkContextImplementation.GetState[T](String name) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\WorkContextImplementation.cs:line 28
at Orchard.WorkContext.get_CurrentUser() in c:\Users\sebros\My Projects\Orchard\src\Orchard\WorkContext.cs:line 60
at Orchard.Security.Authorizer.Authorize(Permission permission, IContent content, LocalizedString message) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Security\Authorizer.cs:line 72
at Orchard.Security.Authorizer.Authorize(Permission permission) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Security\Authorizer.cs:line 60
at Orchard.Security.SecurityFilter.OnAuthorization(AuthorizationContext filterContext) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Security\SecurityFilter.cs:line 24
at System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__19()
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.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag)
at System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag)
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag)
at System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag)
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag)
at System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
at Orchard.Mvc.Routes.ShellRoute.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Mvc\Routes\ShellRoute.cs:line 162
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
编辑:
我今天还在日志中发现了以下错误...听起来像是 Orchard 中的某种多线程错误。
[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, TaskCompletionSource`1\ completion, Int32 timeout, Task& task, Boolean asyncWrite)
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.System.Data.IDbCommand.ExecuteReader()
at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd)
at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes,\ Boolean callable, RowSelection selection, ISessionImplementor session)
at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters\ queryParameters, Boolean returnProxies)
at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor\ session, QueryParameters queryParameters, Boolean returnProxies)
at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters\ queryParameters)
[GenericADOException: could not execute query [ select providerco0_.Id as Id45_,\ providerco0_.IsEnabled as IsEnabled45_, providerco0_.DisplayName as DisplayN3_45_,\ providerco0_.ProviderName as Provider4_45_, providerco0_.ProviderIdKey as Provider5_45_,\ providerco0_.ProviderSecret as Provider6_45_, providerco0_.ProviderIdentifier\ as Provider7_45_ from NGM_OpenAuthentication_ProviderConfigurationRecord providerco0_\ where providerco0_.ProviderName=@p0 ] Name:p1 - Value:Google [SQL: select\ providerco0_.Id as Id45_, providerco0_.IsEnabled as IsEnabled45_, providerco0_.DisplayName\ as DisplayN3_45_, providerco0_.ProviderName as Provider4_45_, providerco0_.ProviderIdKey\ as Provider5_45_, providerco0_.ProviderSecret as Provider6_45_, providerco0_.ProviderIdentifier\ as Provider7_45_ from NGM_OpenAuthentication_ProviderConfigurationRecord providerco0_\ where providerco0_.ProviderName=@p0]]
at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters\ queryParameters)
at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session,\ QueryParameters queryParameters)
at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters\ queryParameters, ISet`1 querySpaces, IType[] resultTypes)
at NHibernate.Hql.Ast.ANTLR.Loader.QueryLoader.List(ISessionImplementor session,\ QueryParameters queryParameters)
at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.List(ISessionImplementor session,\ QueryParameters queryParameters)
at NHibernate.Engine.Query.HQLQueryPlan.PerformList(QueryParameters queryParameters,\ ISessionImplementor session, IList results)
at NHibernate.Impl.SessionImpl.List(IQueryExpression queryExpression, QueryParameters\ queryParameters, IList results)
at NHibernate.Impl.AbstractSessionImpl.List(IQueryExpression queryExpression,\ QueryParameters parameters)
at NHibernate.Impl.ExpressionQueryImpl.List()
at NHibernate.Linq.DefaultQueryProvider.ExecuteQuery(NhLinqExpression nhLinqExpression,\ IQuery query, NhLinqExpression nhQuery)
at NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression)
at NHibernate.Linq.DefaultQueryProvider.Execute[TResult](Expression expression)
at System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1 source)
at Orchard.Data.Repository`1.Get(Expression`1 predicate) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Repository.cs:line 91
at Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Expression`1\ predicate) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Repository.cs:line\ 60
at NGM.OpenAuthentication.Services.ProviderConfigurationService.Get(String\ providerName)
at NGM.OpenAuthentication.Services.OrchardOpenAuthClientProvider.GetClientData(String\ providerName)
at NGM.OpenAuthentication.Shapes.<Discover>b__3(IExternalAuthenticationClient\ client)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at NGM.OpenAuthentication.Shapes.Discover(ShapeTableBuilder builder)
at Orchard.DisplayManagement.Descriptors.DefaultShapeTableManager.<>c__DisplayClass10.<GetShapeTable>b__4(Meta`1\ bindingStrategy) in c:\Users\sebros\My Projects\Orchard\src\Orchard\DisplayManagement\Descriptors\DefaultShapeTableManager.cs:line 48
at Orchard.Caching.DefaultParallelCacheContext.<>c__DisplayClass5`2.<>c__DisplayClass7.<RunInParallel>b__1()\ in c:\Users\sebros\My Projects\Orchard\src\Orchard\Caching\DefaultParallelCacheContext.cs:line\ 24
at Orchard.Caching.DefaultParallelCacheContext.TaskWithAcquireContext`1.Execute()\ in c:\Users\sebros\My Projects\Orchard\src\Orchard\Caching\DefaultParallelCacheContext.cs:line\ 71
at Orchard.Caching.DefaultParallelCacheContext.<RunInParallel>b__2[T,TResult](ITask`1\ task) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Caching\DefaultParallelCacheContext.cs:line\ 30
at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorResults.GetElement(Int32\ index)
at System.Linq.Parallel.QueryResults`1.get_Item(Int32 index)
at System.Linq.Parallel.ArrayMergeHelper`1.ToArrayElement(Int32 index)
at System.Linq.Parallel.ForAllOperator`1.ForAllEnumerator`1.MoveNext(TInput&\ currentElement, Int32& currentKey)
at System.Linq.Parallel.ForAllSpoolingTask`2.SpoolingWork()
at System.Linq.Parallel.SpoolingTaskBase.Work()
at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
at System.Linq.Parallel.QueryTask.<.cctor>b__0(Object o)
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
[AggregateException: One or more errors occurred.]
at System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose)
at System.Linq.Parallel.SpoolingTask.SpoolForAll[TInputOutput,TIgnoreKey](QueryTaskGroupState\ groupState, PartitionedStream`2 partitions, TaskScheduler taskScheduler)
at System.Linq.Parallel.DefaultMergeHelper`2.System.Linq.Parallel.IMergeHelper<TInputOutput>.Execute()
at System.Linq.Parallel.MergeExecutor`1.Execute()
at System.Linq.Parallel.MergeExecutor`1.Execute[TKey](PartitionedStream`2\ partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler\ taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId)
at System.Linq.Parallel.PartitionedStreamMerger`1.Receive[TKey](PartitionedStream`2\ partitionedStream)
at System.Linq.Parallel.ForAllOperator`1.WrapPartitionedStream[TKey](PartitionedStream`2\ inputStream, IPartitionedStreamRecipient`1 recipient, Boolean preferStriping,\ QuerySettings settings)
at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.ChildResultsRecipient.Receive[TKey](PartitionedStream`2\ inputStream)
at System.Linq.Parallel.ScanQueryOperator`1.ScanEnumerableQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1\ recipient)
at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1\ recipient)
at System.Linq.Parallel.QueryOperator`1.GetOpenedEnumerator(Nullable`1 mergeOptions,\ Boolean suppressOrder, Boolean forEffect, QuerySettings querySettings)
at System.Linq.Parallel.ForAllOperator`1.RunSynchronously()
at System.Linq.ParallelEnumerable.ForAll[TSource](ParallelQuery`1 source,\ Action`1 action)
at System.Linq.Parallel.ArrayMergeHelper`1.Execute()
at System.Linq.Parallel.QueryOperator`1.ExecuteAndGetResultsAsArray()
at System.Linq.ParallelEnumerable.ToArray[TSource](ParallelQuery`1 source)
at Orchard.Caching.DefaultParallelCacheContext.RunInParallel[T,TResult](IEnumerable`1\ source, Func`2 selector) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Caching\DefaultParallelCacheContext.cs:line 27
at Orchard.DisplayManagement.Descriptors.DefaultShapeTableManager.<>c__DisplayClass10.<GetShapeTable>b__3(AcquireContext`1\ x) in c:\Users\sebros\My Projects\Orchard\src\Orchard\DisplayManagement\Descriptors\DefaultShapeTableManager.cs:line 42
at Orchard.Caching.Cache`2.CreateEntry(TKey k, Func`2 acquire) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Caching\Cache.cs:line 57
at Orchard.Caching.Cache`2.AddEntry(TKey k, Func`2 acquire) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Caching\Cache.cs:line 27
at Orchard.Caching.Cache`2.<>c__DisplayClass2.<Get>b__0(TKey k) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Caching\Cache.cs:line 19
at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key,\ Func`2 addValueFactory, Func`3 updateValueFactory)
at Orchard.Caching.Cache`2.Get(TKey key, Func`2 acquire) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Caching\Cache.cs:line 17
at Orchard.Caching.DefaultCacheManager.Get[TKey,TResult](TKey key, Func`2\ acquire) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Caching\DefaultCacheManager.cs:line\ 33
at Orchard.DisplayManagement.Descriptors.DefaultShapeTableManager.GetShapeTable(String\ themeName) in c:\Users\sebros\My Projects\Orchard\src\Orchard\DisplayManagement\Descriptors\DefaultShapeTableManager.cs:line 39
更新2:新的堆栈跟踪:
[TransactionException: The operation is not valid for the state of the transaction.]
System.Transactions.TransactionState.EnlistVolatile(InternalTransaction tx, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions, Transaction atomicTransaction) +53
System.Transactions.Transaction.EnlistVolatile(IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions) +281
NHibernate.Transaction.AdoNetWithDistributedTransactionFactory.EnlistInDistributedTransactionIfNeeded(ISessionImplementor session) +469
NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType loadType) +353
NHibernate.Impl.SessionImpl.Get(String entityName, Object id) +454
NHibernate.Impl.SessionImpl.Get(Type entityClass, Object id) +372
NHibernate.Impl.SessionImpl.Get(Object id) +389
Orchard.Data.Repository`1.Get(Int32 id) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Repository.cs:87
Orchard.ContentManagement.Handlers.<>c__DisplayClass1.<Loading>b__0(TRecord prior) in c:\Users\sebros\My Projects\Orchard\src\Orchard\ContentManagement\Handlers\StorageFilter.cs:54
Orchard.ContentManagement.Utilities.LazyField`1.GetValue() in c:\Users\sebros\My Projects\Orchard\src\Orchard\ContentManagement\Utilities\LazyField.cs:24
Orchard.Users.Models.RegistrationSettingsPart.get_UsersCanRegister() +16
ASP._Page_Modules_Orchard_Users_Views_LogOn_cshtml.Execute() in c:\Users\jeff_000\documents\visual studio 2012\projects\cabwithme.orchard\Modules\Orchard.Users\Views\LogOn.cshtml:4
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +126
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +196
System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +158
Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.Render(ShapeDescriptor shapeDescriptor, DisplayContext displayContext, HarvestShapeInfo harvestShapeInfo, HarvestShapeHit harvestShapeHit) in c:\Users\sebros\My Projects\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:137
Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.<>c__DisplayClass28.<Discover>b__15(DisplayContext displayContext) in c:\Users\sebros\My Projects\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:118
Orchard.DisplayManagement.Descriptors.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\Users\sebros\My Projects\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAlterationBuilder.cs:55
Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\Users\sebros\My Projects\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:179
Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\Users\sebros\My Projects\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:88
Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in c:\Users\sebros\My Projects\Orchard\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:71
ClaySharp.<>c__DisplayClass16.<InvokeMember>b__13() in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:29
ClaySharp.ClayBehaviorCollection.Execute(Func`1 proceed, Func`3 linker) in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:13
ASP._Page_Core_Shapes_Views_ShapeResult_Display_cshtml.Execute() in c:\Users\jeff_000\documents\visual studio 2012\projects\cabwithme.orchard\Core\Shapes\Views\ShapeResult\Display.cshtml:1
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +126
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +196
Orchard.Mvc.ViewEngines.ThemeAwareness.<>c__DisplayClass7.<FindView>b__5(ViewContext viewContext, TextWriter writer, IViewDataContainer viewDataContainer) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Mvc\ViewEngines\ThemeAwareness\LayoutAwareViewEngine.cs:60
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +378
System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +33
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
最佳答案
似乎 OpenAuthentication 模块在调用 NGM.OpenAuthentication.Shapes.Discover(ShapeTableBuilder builder)
期间正在执行一些数据库工作。 Orchard 在准备用于缓存的形状表时并行调用此方法。因此,它可能会也可能不会在与请求线程不同的线程上运行。如果不先抑制当前的 TransactionScope
,任何数据库操作都不应该永远发生。
Orchard 1.6(及更早版本)在整个请求上使用环境事务 (TransactionScope
)(它在请求开始和结束时开始和结束)。因此,可能(并且将会)出现请求线程在生成的线程之前完成的情况。这是完全正常的。但是...如果在该线程上执行数据库操作 - 它将失败,因为底层事务已经完成。
这不是 Orchard 错误,而是 OpenAuthentication 模块中可能存在的错误,因此最好联系其作者。但首先,尝试从存储库中获取最新的源代码(图库模块可能已经过时)并尝试重现。
关于.net - Orchard CMS 事务错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16268287/
我正在使用 PostgREST 将数据库实体暴露给使用这些实体的 Springboot 应用。 我的数据库中有两个实体,分别是 Person 和 City。 我想同时保存 Person 实体和 Cit
1、事务的定义 Redis的事务提供了一种“将多个命令打包, 然后一次性、按顺序地执行”的机制。 redis事务的主要作用就是串联多个命令防止别的命令插队。 但是,事务并不具有传统
SQLite 事务(Transaction) 事务(Transaction)是一个对数据库执行工作单元。事务(Transaction)是以逻辑顺序完成的工作单位或序列,可以是由用户手动操作完成,也可
事务是顺序组操作。 它们作为单个单元运行,并且直到组中的所有操作都成功执行时才终止。 组中的单个故障会导致整个事务失败,并导致对数据库没有影响。 事务符合ACID(原子性,一致性,隔离和耐久性)
我希望将 SqlKata 用于一个项目。但是,项目标准的一部分是查询应该能够作为事务执行。有没有一种方法可以使用 MSSQL 事务执行一个查询或多个查询? 非常感谢。 最佳答案 SQLKata 使用
我只是以多线程方式测试 PetaPoco 事务... 我有一个简单的测试用例: -- 简单的值对象称之为 MediaDevice -- 插入一条记录,更新1000次 void TransactionT
我正在尝试从 Excel VBA 向 SQL 中插入一些数据。 SQL 命令是在 VBA 脚本的过程中构建的,包括使用一些 SQL 变量。 我试图了解事务在 VBA 中是如何工作的,以及它们是否可以处
情况如下: 一个大型生产客户端/服务器系统,其中一个中央数据库表具有某个列,该列的默认值是 NULL,但现在默认值是 0。但是在该更改之前创建的所有行当然仍然具有 null 值,这会在该系统中生成许多
数据库事务是一个熟悉的概念。 try { ... .. updateDB() .. ... commit(); } catch error { rollback(); }
我想了解使用传播支持进行 Spring 交易的用途。 java 文档提到如果具有 @Transactional(propagation = Propagation.SUPPORTS) 的方法从支持该事
我需要获取 hibernate 的事务 ID。对于每笔交易,此 ID 必须是唯一的。我尝试使用 session.getTransaction().hashCode(),但我相信这个值不是唯一的。 最佳
我从 firebase 收到以下消息:runTransactionBlock:启用持久性时检测到的使用情况。请注意,事务不会在应用重新启动后保留。 那么应用程序重新启动后到底会发生什么?由于主数据库的
我需要在 jdbc 中执行选择、更新、插入查询的序列。 这是我的代码: public String editRequest(){ connection = DatabaseUtil.getServi
Java 是否提供了一种智能“聚合”事务的方法?如果我有多个异构数据存储库,我想保持同步(即用于数据的 Postgres、用于图表的 Neo4j 以及用于索引的 Lucene),是否有一个范例仅允许
我对标题中的主题有几个问题。首先,假设我们使用 JDBC,并且有 2 个事务 T1 和 T2。在 T1 中,我们在一个特定的行上执行 select 语句。然后我们对该行执行更新。在事务 T2 中,我们
我有一个 Python CGI 处理支付交易。当用户提交表单时,CGI 被调用。提交后,CGI 需要一段时间才能执行信用卡交易。在此期间,用户可能会按下 ESC 或刷新按钮。这样做不会“杀死”CGI,
我有一个代码,类似这样 def many_objects_saving(list_of_objects): for some_object in list_of_objects:
我有一个包含 100,000 条记录的表。我正在考虑使用事务来更新数据。将有一个查询将一列更新为零,并且大约有 5000 个更新,每个更新将更新一条记录。 这些大型事务对内存有何影响?事务运行时选择数
有没有办法在一个命令中执行 SQL 事务?例如 mysql_query(" START TRANSACTION; INSERT INTO table1 ....etc; INSERT INTO tab
真心希望能帮到你! 我使用以下函数在 PHP/MySql 应用程序中发送消息: public function sendMail($sender_id, $recipient_id, $subject
我是一名优秀的程序员,十分优秀!