“/”应用程序中的服务器错误。

在多语句事务内不允许使用 CREATE DATABASE 语句。

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Data.SqlClient.SqlException: 在多语句事务内不允许使用 CREATE DATABASE 语句。

源错误:

执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:


[SqlException (0x80131904): 在多语句事务内不允许使用 CREATE DATABASE 语句。]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +277
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +764
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4243
   System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) +1352
   System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +420
   System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +391
   System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch(TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) +977
   System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand command, DbCommandInterceptionContext interceptionContext) +499
   System.Data.Entity.SqlServer.<>c__DisplayClass1a.<CreateDatabaseFromScript>b__19(DbConnection conn) +135
   System.Data.Entity.SqlServer.<>c__DisplayClass33.<UsingConnection>b__32() +587
   System.Data.Entity.SqlServer.<>c__DisplayClass1.<Execute>b__0() +18
   System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1 operation) +234
   System.Data.Entity.SqlServer.SqlProviderServices.UsingMasterConnection(DbConnection sqlConnection, Action`1 act) +909
   System.Data.Entity.SqlServer.SqlProviderServices.CreateDatabaseFromScript(Nullable`1 commandTimeout, DbConnection sqlConnection, String createDatabaseScript) +117
   System.Data.Entity.SqlServer.SqlProviderServices.DbCreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection) +211
   System.Data.Entity.Migrations.Utilities.DatabaseCreator.Create(DbConnection connection) +125
   System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase) +156
   System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration) +116
   System.Data.Entity.Internal.DatabaseCreator.CreateDatabase(InternalContext internalContext, Func`3 createMigrator, ObjectContext objectContext) +124
   System.Data.Entity.Database.Create(DatabaseExistenceState existenceState) +292
   System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context) +187
   System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +75
   System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +482
   System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) +173
   System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) +269
   Abp.EntityFramework.AbpDbContext.Initialize() +58
   Castle.MicroKernel.LifecycleConcerns.InitializationConcern.Apply(ComponentModel model, Object component) +45
   Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.ApplyConcerns(IEnumerable`1 steps, Object instance) +111
   Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) +82
   Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden) +26
   Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally) +59
   Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy) +28
   Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) +274
   Castle.MicroKernel.Handlers.ExtendedHandler.InvokeResolvePipeline(Int32 extensionIndex, ResolveInvocation invocation) +128
   Castle.MicroKernel.Handlers.ComponentLifecycleExtension.Intercept(ResolveInvocation invocation) +284
   Castle.MicroKernel.Handlers.ExtendedHandler.InvokeResolvePipeline(Int32 extensionIndex, ResolveInvocation invocation) +281
   Castle.MicroKernel.Handlers.ExtendedHandler.Resolve(CreationContext context, Boolean instanceRequired) +123
   Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy) +169
   Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy) +73
   Castle.Windsor.WindsorContainer.Resolve() +60
   Abp.EntityFramework.Uow.EfUnitOfWork.GetOrCreateDbContext() +175
   Castle.Proxies.EfRepositoryBase`3Proxy_22.get_Context_callback() +23
   Castle.Proxies.Invocations.EfRepositoryBase`3_get_Context_26.InvokeMethodOnTarget() +43
   Castle.DynamicProxy.AbstractInvocation.Proceed() +110
   Castle.DynamicProxy.AbstractInvocation.Proceed() +447
   Castle.Proxies.EfRepositoryBase`3Proxy_22.get_Context() +164
   Abp.EntityFramework.Repositories.EfRepositoryBase`3.get_Table() +27
   Castle.Proxies.Invocations.EfRepositoryBase`3_get_Table_26.InvokeMethodOnTarget() +43
   Castle.DynamicProxy.AbstractInvocation.Proceed() +110
   Castle.DynamicProxy.AbstractInvocation.Proceed() +447
   Castle.Proxies.EfRepositoryBase`3Proxy_22.get_Table() +164
   Castle.Proxies.EfRepositoryBase`3Proxy_22.GetAll_callback() +14
   Castle.Proxies.Invocations.EfRepositoryBase`3_GetAll_26.InvokeMethodOnTarget() +39
   Castle.DynamicProxy.AbstractInvocation.Proceed() +110
   Castle.DynamicProxy.AbstractInvocation.Proceed() +447
   Castle.Proxies.EfRepositoryBase`3Proxy_22.GetAll() +164
   CQBMSSPlatform.SystemParameter.ParaSettingsAppService.GetParaByCategoryCode(Guid paraCateCode) +70
   Castle.Proxies.ParaSettingsAppServiceProxy.GetParaByCategoryCode_callback(Guid paraCateCode) +9
   Castle.Proxies.Invocations.IParaSettingsAppService_GetParaByCategoryCode.InvokeMethodOnTarget() +119
   Castle.DynamicProxy.AbstractInvocation.Proceed() +110
   Castle.DynamicProxy.AbstractInvocation.Proceed() +447
   Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) +62
   Castle.DynamicProxy.AbstractInvocation.Proceed() +447
   Castle.DynamicProxy.AbstractInvocation.Proceed() +447
   Castle.DynamicProxy.AbstractInvocation.Proceed() +447
   Castle.Proxies.ParaSettingsAppServiceProxy.GetParaByCategoryCode(Guid code) +217
   CQBMSSPlatform.Web.Controllers.Workbench.DevelopFrontController.GetMyParams(Boolean addAll, Guid cateCode) +34
   CQBMSSPlatform.Web.Controllers.Workbench.DevelopFrontController.Develop(String keyId) +313
   lambda_method(Closure , ControllerBase , Object[] ) +139
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +229
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +39
   System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +77
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +72
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +387
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +38
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +188
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +39
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +43
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +648
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +213
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +131


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.7.3062.0