我已将应用程序部署在AWS中。当我运行该应用程序时,它似乎可以运行,但是问题出在我尝试注册或登录时。它引发错误:
“ /”应用程序中的服务器错误。 目标主体名称不正确。无法生成SSPI上下文。 说明:执行当前Web请求期间发生未处理的异常。请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息。
异常详细信息:System.Data.SqlClient.SqlException:目标主体名称不正确。无法生成SSPI上下文。
源错误:
var结果=等待SignInManager.PasswordSignInAsync(model.Email,model.Password,> model.RememberMe,shouldLockout:false); 89行:开关(结果) 第90行:{
StackTrace
[SqlException(0x80131904):目标主体名称不正确。 无法生成SSPI上下文。]
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,UInt32 waitForMultipleObjectsTimeout,布尔值 allowCreate,仅布尔值OneCheckConnection,DbConnectionOptions userOptions,DbConnectionInternal&连接)+1309
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +108
1重试,DbConnectionOptions userOptions,DbConnectionInternal oldConnection,DbConnectionInternal& 连接)+937
System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource
System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection externalConnection,DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) +143
1重试,DbConnectionOptions userOptions)+17
System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource
System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry) +139
1 重试)+448 System.Data.SqlClient.SqlConnection.Open()+129
System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource
System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.b__36(DbConnection t,DbConnectionInterceptionContext c)+10
System.Data.Entity.Infrastructure.Interception.InternalDispatcher1.Dispatch(TTarget target, Action
2操作,TInterceptionContext拦截上下文, 行动3 executing, Action
3已执行)+72
System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection 连接,DbInterceptionContext拦截上下文)+360
System.Data.Entity.SqlServer。<> c__DisplayClass33.b__32() +426 System.Data.Entity.SqlServer。<> c__DisplayClass1.b__0()+10
System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func1 operation) +189
1动)+175
System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation) +78
System.Data.Entity.SqlServer.SqlProviderServices.UsingConnection(DbConnection sqlConnection, Action
System.Data.Entity.SqlServer.SqlProviderServices.UsingMasterConnection(DbConnection sqlConnection,操作1 act) +556
1 commandTimeout,DbConnection,sqlConnection,字符串 createDatabaseScript)+90
System.Data.Entity.SqlServer.SqlProviderServices.CreateDatabaseFromScript(Nullable
System.Data.Entity.SqlServer.SqlProviderServices.DbCreateDatabase(DbConnection 连接,可空1 commandTimeout, StoreItemCollection storeItemCollection) +171
1 commandTimeout,StoreItemCollection storeItemCollection)+76
System.Data.Entity.Core.Common.DbProviderServices.CreateDatabase(DbConnection connection, Nullable
System.Data.Entity.Core.Objects.ObjectContext.CreateDatabase()+134
System.Data.Entity.Migrations.Utilities.DatabaseCreator.Create(DbConnection 连接)+119
System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(动作 mustSucceedToKeepDatabase)+142
System.Data.Entity.Migrations.DbMigrator.Update(字符串 targetMigration)+78
System.Data.Entity.Internal.DatabaseCreator.CreateDatabase(InternalContext internalContext,Func3 createMigrator, ObjectContext objectContext) +89 System.Data.Entity.Internal.InternalContext.CreateDatabase(ObjectContext objectContext, DatabaseExistenceState existenceState) +116
1.InitializeDatabase(TContext 上下文)+151
System.Data.Entity.Database.Create(DatabaseExistenceState existenceState) +218
System.Data.Entity.CreateDatabaseIfNotExists
System.Data.Entity.Internal。<> c__DisplayClassf1.<CreateInitializationAction>b__e() +76 System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +60
1.PerformAction(TInput输入) +110 System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(动作
System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +357 System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c) +7
System.Data.Entity.Internal.RetryAction1 action) +198
1.Initialize()+53
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() +73 System.Data.Entity.Internal.InternalContext.Initialize() +30 System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +16
System.Data.Entity.Internal.Linq.InternalSet
System.Data.Entity.Internal.Linq.InternalSet1.get_InternalContext() +15 System.Data.Entity.Infrastructure.DbQuery
1.System.Linq.IQueryable.get_Provider() +38 System.Data.Entity.QueryableExtensions.FirstOrDefaultAsync(IQueryable1 source, Expression
1谓词,CancellationToken cancelledToken) +138 System.Data.Entity.QueryableExtensions.FirstOrDefaultAsync(IQueryable1 source, Expression
1谓词)+145
Microsoft.AspNet.Identity.EntityFramework.d__67.MoveNext() +402 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务 任务)+102
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务 任务)+64 Microsoft.AspNet.Identity.CultureAwaiter1.GetResult() +59 Microsoft.AspNet.Identity.Owin.<PasswordSignInAsync>d__25.MoveNext() +309 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102
1.GetResult() +24 Aayumitra.Controllers.d__13.MoveNext()在D:\ Aayumitra_Doctor \ Aayumitra \ Controllers \ AccountController.cs:88
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 System.Runtime.CompilerServices.TaskAwaiter
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务 任务)+102
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务 任务)+64
System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult)+97
System.Web.Mvc.Async。<> c__DisplayClass8_0.b__1(IAsyncResult asyncResult)+17
System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10
1.End()+49
System.Web.Mvc.Async.WrappedAsyncResultBase
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)+32
System.Web.Mvc.Async.AsyncInvocationWithFilters.b__11_0() +50 System.Web.Mvc.Async。<> c__DisplayClass11_1.b__2() +228 System.Web.Mvc.Async。<> c__DisplayClass7_0.b__1(IAsyncResult asyncResult)+10
System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10
1.End()+49
System.Web.Mvc.Async.WrappedAsyncResultBase
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)+34
System.Web.Mvc.Async。<> c__DisplayClass3_6.b__3() +35 System.Web.Mvc.Async。<> c__DisplayClass3_1.b__5(IAsyncResult asyncResult)+100
System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10
1.End()+49
System.Web.Mvc.Async.WrappedAsyncResultBase
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)+27
System.Web.Mvc。<> c.b__152_1(IAsyncResult asyncResult,ExecuteCoreState innerState)+11
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +29
1.End()+49
System.Web.Mvc.Async.WrappedAsyncResultBase
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)+45 System.Web.Mvc。<> c.b__151_2(IAsyncResult asyncResult, 控制器控制器)+13
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +22
1.End()+49
System.Web.Mvc.Async.WrappedAsyncResultBase
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)+26
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult)+10
System.Web.Mvc。<> c.b__20_1(IAsyncResult asyncResult,ProcessRequestState innerState)+28
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +29
1.End()+49
System.Web.Mvc.Async.WrappedAsyncResultBase
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult 结果)+9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +576 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep步骤)+132 System.Web.HttpApplication.ExecuteStep(IExecutionStep 步骤,布尔值和已同步完成)+163