Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc 将MVC应用程序发布到azure_Asp.net Mvc_Entity Framework_Azure - Fatal编程技术网

Asp.net mvc 将MVC应用程序发布到azure

Asp.net mvc 将MVC应用程序发布到azure,asp.net-mvc,entity-framework,azure,Asp.net Mvc,Entity Framework,Azure,它在本地计算机上运行良好。我将连接字符串更改为azure db,并修复了一些引用以达到这一目的 Internal .Net Framework Data Provider error 6. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about th

它在本地计算机上运行良好。我将连接字符串更改为azure db,并修复了一些引用以达到这一目的

Internal .Net Framework Data Provider error 6. 
Description: An unhandled exception occurred during the execution of the  current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: System.InvalidOperationException: Internal .Net Framework Data Provider error 6.

Source Error: 


 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 



[InvalidOperationException: Internal .Net Framework Data Provider error 6.]
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +347
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +78
    System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +191
    System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +154
    System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +21
    System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +90
    System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +217
    System.Data.SqlClient.SqlConnection.Open() +96


    System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<Open>b__36(DbConnection t, DbConnectionInterceptionContext c) +10
            System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch(TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) +72
           System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext) +360
        System.Data.Entity.Core.EntityClient.EntityConnection.<Open>b__2() +55
        System.Data.Entity.SqlServer.<>c__DisplayClass1.<Execute>b__0() +10
         System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1 operation) +189
       System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation) +78
       System.Data.Entity.Core.EntityClient.EntityConnection.Open() +253

       [EntityException: The underlying provider failed on Open.]
   System.Data.Entity.Core.EntityClient.EntityConnection.Open() +323
   System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions) +133
   System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction(Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) +46
   System.Data.Entity.Core.Objects.<>c__DisplayClass7.<GetResults>b__5() +154
   System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1 operation) +189
   System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +279
   System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0() +11
   System.Data.Entity.Internal.LazyEnumerator`1.MoveNext() +45
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +121
   System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__1(IEnumerable`1 sequence) +40
   System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle(IEnumerable`1 query, Expression queryRoot) +60
   System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) +113
   System.Data.Entity.Internal.Linq.DbQueryProvider.Execute(Expression expression) +113
   System.Linq.Queryable.FirstOrDefault(IQueryable`1 source) +211
   System.Data.Entity.Internal.EdmMetadataRepository.QueryForModelHash(Func`2 createContext) +285
   System.Data.Entity.Internal.InternalContext.QueryForModelHash() +198
   System.Data.Entity.Internal.ModelCompatibilityChecker.CompatibleWithModel(InternalContext internalContext, ModelHashCalculator modelHashCalculator, Boolean throwIfNoMetadata, DatabaseExistenceState existenceState) +84
   System.Data.Entity.Internal.InternalContext.CompatibleWithModel(Boolean throwIfNoMetadata, DatabaseExistenceState existenceState) +54
   System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context) +117
   System.Data.Entity.Internal.<>c__DisplayClassf`1.<CreateInitializationAction>b__e() +76
   System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +60

[DataException: An exception occurred while initializing the database. See the InnerException for details.]
   System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +122
   System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +357
   System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c) +7
   System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) +110
   System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) +198
   System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() +73
   System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +28
   System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +53
   System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() +15
   System.Data.Entity.Internal.Linq.InternalSet`1.ExecuteSqlQuery(String sql, Boolean asNoTracking, Nullable`1 streaming, Object[] parameters) +96
   System.Data.Entity.Internal.InternalSqlSetQuery.GetEnumerator() +42
   System.Data.Entity.Infrastructure.DbRawSqlQuery`1.GetEnumerator() +30
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +369
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
   Login.Controllers.HomeController.Index(String error) +283
   lambda_method(Closure , ControllerBase , Object[] ) +104
   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +182
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
   System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +28
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +10
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
   System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +58
   System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +225
   System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
   System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +24
   System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +99
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +16
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +16
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
   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__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +16
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9644037
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
内部.Net Framework数据提供程序错误6。
描述:执行当前web请求期间发生未处理的异常。请查看堆栈跟踪以了解有关错误的更多信息以及错误在代码中的起源。
异常详细信息:System.InvalidOperationException:内部.Net Framework数据提供程序错误6。
源错误:
在执行当前web请求期间生成了未经处理的异常。有关异常的起源和位置的信息可以使用下面的异常堆栈跟踪来识别。
堆栈跟踪:
[无效操作异常:内部.Net Framework数据提供程序错误6。]
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection-owningObject,UInt32-waitForMultipleObjectsTimeout,布尔allowCreate,布尔OnlyOnEckConnection,DbConnectionOptions-userOptions,DbConnectionInternal&connection)+347
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject、TaskCompletionSource`1重试、DbConnectionOptions用户选项、DbConnectionInternal和connection)+78
System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection、TaskCompletionSource`1重试、DbConnectionOptions用户选项、DbConnectionInternal oldConnection、DbConnectionInternal&connection)+191
System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection,DbConnectionFactory connectionFactory,TaskCompletionSource`1 retry,DbConnectionOptions userOptions)+154
System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection,DbConnectionFactory connectionFactory,TaskCompletionSource`1重试,DbConnectionOptions用户选项)+21
System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1重试)+90
System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1重试)+217
System.Data.SqlClient.SqlConnection.Open()+96
System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.b_uu36(DbConnection t,DbConnectionInterceptionContext c)+10
System.Data.Entity.Infrastructure.InternalDispatcher`1.Dispatch(目标目标,操作`2操作,TInterceptionContext拦截上下文,操作`3执行,操作`3执行)+72
System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection-connection,DbInterceptionContext-interceptionContext)+360
System.Data.Entity.Core.EntityClient.EntityConnection.b__2()+55
System.Data.Entity.SqlServer.c__DisplayClass1.b__0()+10
System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1操作)+189
System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(操作操作)+78
System.Data.Entity.Core.EntityClient.EntityConnection.Open()+253
[EntityException:基础提供程序在打开时失败。]
System.Data.Entity.Core.EntityClient.EntityConnection.Open()+323
System.Data.Entity.Core.Objects.ObjectContext.EnsureReconnection(布尔值shouldMonitorTransactions)+133
System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction(Func`1 Func,IDbExecutionStrategy executionStrategy,Boolean startLocalTransaction,Boolean releaseConnectionOnSuccess)+46
System.Data.Entity.Core.Objects.c__DisplayClass7.b__5()+154
System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1操作)+189
System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(可为null`1 forMergeOption)+279
System.Data.Entity.Core.Objects.ObjectQuery`1.b__0()+11
System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()+45
System.Linq.Enumerable.FirstOrDefault(IEnumerable`1源)+121
System.Data.Entity.Core.Objects.Elink.ObjectQueryProvider.b__1(IEnumerable`1序列)+40
System.Data.Entity.Core.Objects.elink.ObjectQueryProvider.ExecuteSingle(IEnumerable`1查询,表达式queryRoot)+60
System.Data.Entity.Core.Objects.elink.ObjectQueryProvider.System.Linq.IQueryProvider.Execute(表达式)+113
System.Data.Entity.Internal.Linq.DbQueryProvider.Execute(表达式)+113
System.Linq.Queryable.FirstOrDefault(IQueryable`1源)+211
System.Data.Entity.Internal.EdmMetadataRepository.QueryForModelHash(Func`2 createContext)+285
System.Data.Entity.Internal.InternalContext.QueryForModelHash()+198
System.Data.Entity.Internal.ModelCompatibilityChecker.CompatibleWithModel(InternalContext InternalContext,ModelHashCalculator ModelHashCalculator,Boolean ThrowFNMetadata,DatabaseExistenceEstate ExistenceEstate)+84
System.Data.Entity.Internal.InternalContext.CompatibleWithModel(布尔ThrowifNMetadata,DatabaseExistenceEstate)+54
System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext上下文)+117
System.Data.Entity.Internal.c__;u DisplayClassf`1.b_;u e()+76
System.Data.Entity.Internal.InternalContext.PerformilizationAction(Action Action)+60
[DataException:初始化数据库时发生异常。有关详细信息,请参阅InnerException。]
System.Data.Entity.Internal.InternalContext.PerforminizationAction(操作操作)+122
System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()+357
System.Data.Entity.Internal.LazyInternalContext.b_u4(InternalContext c)+7
System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput输入)+110
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 Action)+198
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase()+73
System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(类型entityType)+28
System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()+53
System.Data.Entity.Internal.Linq.Int
providerName="System.Data.EntityClient"
providerName="System.Data.SqlClient"