2013-04-28 92 views
3

我们始终如一地在我们的Orchard网站上发现以下错误。在页面之间快速浏览时,它似乎最为流行。日志中没有其他错误,所以我不知道如何找出根本原因。我们没有对ODBC或类似的东西做任何特别的处理(这是谷歌在搜索有关Orchard的这个错误时所提出的)。Orchard CMS交易错误

[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) 

编辑:

我今天还发现了以下错误的日志...这听起来像是某种的多线程错误的果园。

[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 [email protected] ] 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 [email protected]]] 
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 
+0

您启用了哪些模块? – Hazza 2013-04-29 01:23:16

+0

默认的。加上CKEditor,NGM.OpenAuthentication和一个自定义的。我会考虑禁用它们,如果它能帮助我找出原因......但是Orchard没有关于异常中潜在问题的信息... – Jeff 2013-04-29 01:39:52

+1

使用TransactionScope存在很多问题(模糊的异常消息,性能问题,MSDTC等)。由于1.7(当前的1.x分支),我们只会使用明确的NHibernate事务。这将使大部分问题消失,并允许异步场景。如果你可以升级,你应该。 – 2013-04-29 17:01:51

回答

2

所以,我有同样的这类问题的上托管SQL Azure中乌节网站,我最近部署 - 间歇性交易的错误,没有太大违背在日志等

什么终于修好了我(它可能会或可能不会为你工作,但值得一试)是增加Enlist = false;连接字符串(在App_Data/Sites/Default中的settings.txt中)。

我碰到过这个a blog post someone made about EntityFramework and SQL Azure,并认为它值得NHibernate也拍摄。

4

好像OpenAuthentication模块到NGM.OpenAuthentication.Shapes.Discover(ShapeTableBuilder builder)在通话过程中进行一些数据库的工作。 Orchard在准备用于缓存的形状表时并行调用该方法。所以它可能会或可能不会运行在与请求不同的线程上。没有数据库操作应该有史以来发生在那里,而不是先抑制当前TransactionScope

Orchard 1.6(及更早版本)在整个请求(在请求开始和结束时开始和结束)使用环境事务(TransactionScope)。因此,当请求线程在产生的线程之前完成时,可能(并且将会)情况。这很正常。但是...如果在该线程上执行数据库操作 - 它将失败,因为基础事务已经完成。

这不是果园漏洞,而是OpenAuthentication模块中的一个可能的错误,所以最好联系它的作者。但首先,尝试从存储库中获取最新的源代码(Gallery模块可能已过时)并尝试重新生成。

+1

你完全正确。他修复了他最新的源代码。我看到他在OnDisplay委托中移动了数据访问代码。谢谢! – Jeff 2013-05-01 02:00:17

+0

事实上,在我之前的拉动之后的几天里,他将它固定在一个版本中。 – Jeff 2013-05-01 02:24:25

+0

好的...所以我正在取得进展。我更新了模块的代码...现在我得到另一个事务错误,但只在LogOn页面上。我关闭了我的代码,连接到工作进程并观察其根本原因:事务管理器已禁用其对远程/网络事务的支持。 (来自HRESULT的异常:0x8004D024)。它看起来像试图升级到DTC,因为它正在制作多个SqlConnections或其他东西。我在云主机上,无法使用DTC。我怎样才能阻止Orchard创建这个环境交易? – Jeff 2013-05-01 03:09:12