{"Message":"出现错误。","ExceptionMessage":"在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: SQL Network Interfaces, error: 50 - 发生了 Local Database Runtime 错误。无法创建自动实例。有关错误详细信息,请参阅 Windows 应用程序事件日志。\r\n)","ExceptionType":"System.Data.SqlClient.SqlException","StackTrace":" 在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)\r\n 在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)\r\n 在 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)\r\n 在 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)\r\n 在 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)\r\n 在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)\r\n 在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)\r\n 在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource
1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)\r\n 在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)\r\n 在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource
1 retry)\r\n 在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry)\r\n 在 System.Data.SqlClient.SqlConnection.Open()\r\n 在 System.Data.Entity.Infrastructure.Interception.InternalDispatcher
1.DispatchTTarget,TInterceptionContext\r\n 在 System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)\r\n 在 System.Data.Entity.SqlServer.SqlProviderServices.<>c__DisplayClass33.b__32()\r\n 在 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.b__0()\r\n 在 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.ExecuteTResult\r\n 在 System.Data.Entity.SqlServer.SqlProviderServices.UsingMasterConnection(DbConnection sqlConnection, Action1 act)\r\n 在 System.Data.Entity.SqlServer.SqlProviderServices.CreateDatabaseFromScript(Nullable
1 commandTimeout, DbConnection sqlConnection, String createDatabaseScript)\r\n 在 System.Data.Entity.SqlServer.SqlProviderServices.DbCreateDatabase(DbConnection connection, Nullable1 commandTimeout, StoreItemCollection storeItemCollection)\r\n 在 System.Data.Entity.Migrations.Utilities.DatabaseCreator.Create(DbConnection connection)\r\n 在 System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)\r\n 在 System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)\r\n 在 System.Data.Entity.Internal.DatabaseCreator.CreateDatabase(InternalContext internalContext, Func
3 createMigrator, ObjectContext objectContext)\r\n 在 System.Data.Entity.Database.Create(DatabaseExistenceState existenceState)\r\n 在 System.Data.Entity.CreateDatabaseIfNotExists1.InitializeDatabase(TContext context)\r\n 在 System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)\r\n 在 System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()\r\n 在 System.Data.Entity.Internal.RetryAction
1.PerformAction(TInput input)\r\n 在 System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action1 action)\r\n 在 System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)\r\n 在 System.Data.Entity.Internal.Linq.InternalSet
1.Initialize()\r\n 在 System.Data.Entity.Internal.Linq.InternalSet1.get_InternalContext()\r\n 在 System.Data.Entity.Infrastructure.DbQuery
1.System.Linq.IQueryable.get_Provider()\r\n 在 System.Linq.Queryable.SelectTSource,TResult\r\n 在 WebApi1111250.Controllers.DataModelsController.GetDataModels() 位置 c:\Users\李昊阳\Documents\Visual Studio 2013\Projects\WebApi1111250\WebApi1111250\Controllers\DataModelsController.cs:行号 40\r\n 在 lambda_method(Closure , Object , Object[] )\r\n 在 System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.b__9(Object instance, Object[] methodParameters)\r\n 在 System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()"}

我在Vs中写了一个webApi,把它部署到iis10之后会出现以下错误,有没有大神帮我看一下?
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-