在Azure

时间:2016-01-20 00:26:22

标签: c# asp.net-mvc azure deployment

我在Azure serwer上部署我的应用程序,在尝试进入我的应用程序后,我得到:

错误。 处理您的请求时出错。

所以我在webconfig中添加了一行来查看错误详细信息并尝试找到帮助它为什么不起作用。你可以帮助我吗?

  

' /'中的服务器错误申请。

     

初始化字符串的格式不符合从索引0开始的规范。

     

说明: An   在执行当前Web期间发生了未处理的异常   请求。请查看堆栈跟踪以获取有关的更多信息   错误以及它在代码中的起源。

     

异常详细信息: System.ArgumentException:格式   初始化字符串不符合从...开始的规范   指数0。

     

来源错误:

     

执行期间生成了未处理的异常   当前的网络请求。有关的来源和位置的信息   可以使用下面的异常堆栈跟踪来识别异常。

     

堆栈追踪:

     

[ArgumentException:初始化字符串的格式没有   符合从索引0开始的规格   System.Data.Common.DbConnectionOptions.GetKeyValuePair(字符串   connectionString,Int32 currentPosition,StringBuilder buffer,Boolean   useOdbcRules,String& keyname,String& keyvalue)+5705374
  System.Data.Common.DbConnectionOptions.ParseInternal(哈希表   parsetable,String connectionString,Boolean buildChain,Hashtable   同义词,布尔值firstKey)+124
  System.Data.Common.DbConnectionOptions..ctor(String connectionString,   Hashtable的同义词,Boolean useOdbcRules)+95
  System.Data.SqlClient.SqlConnectionString..ctor(字符串   connectionString)+59
  System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(字符串   connectionString,DbConnectionOptions上一页)+27
  System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey   key,DbConnectionPoolGroupOptions poolOptions,DbConnectionOptions&   userConnectionOptions)+167
  System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey   key)+61
  System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)   +94 System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.b__18(DbConnection)   t,DbConnectionPropertyInterceptionContext 1 c) +12
System.Data.Entity.Infrastructure.Interception.InternalDispatcher
1.Dispatch(TTarget   目标,行动2 operation, TInterceptionContext interceptionContext, Action 3执行,行动3 executed) +72
System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.SetConnectionString(DbConnection connection, DbConnectionPropertyInterceptionContext
1   interceptionContext)+360
  System.Data.Entity.Internal.LazyInternalConnection.InitializeFromConnectionStringSetting(ConnectionStringSettings   appConfigConnection)+269
  System.Data.Entity.Internal.LazyInternalConnection.Initialize()+62
  System.Data.Entity.Internal.LazyInternalConnection.get_Connection()   +12 System.Data.Entity.Internal.LazyInternalContext.get_Connection()+89
  System.Data.Entity.Infrastructure.DbContextInfo..ctor(类型   contextType,DbProviderInfo modelProviderInfo,AppConfig config,   DbConnectionInfo connectionInfo,Func 1 resolver) +367
System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration, DbContext usersContext, DatabaseExistenceState existenceState, Boolean calledByCreateDatabase) +252
System.Data.Entity.MigrateDatabaseToLatestVersion
2.InitializeDatabase(TContext   上下文)+96
  System.Data.Entity.Internal。&lt;&gt; c__DisplayClassf 1.<CreateInitializationAction>b__e() +76 System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +60
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.Infrastructure.DbQuery 1.System.Linq.IQueryable.get_Provider()   +38 System.Linq.Queryable.OrderByDescending(IQueryable 1 source, Expression 1 keySelector)+83
  Kapitula.Controllers.HomeController.Index()+ 845
  lambda_method(Closure,ControllerBase,Object [])+62
  System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase   controller,Object []参数)+14
  System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext   controllerContext,IDictionary 2 parameters) +157
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2   参数)+27
  System.Web.Mvc.Async.AsyncControllerActionInvoker.b__36(IAsyncResult的   asyncResult,ActionInvocation innerInvokeState)+22
  System.Web.Mvc.Async.WrappedAsyncResult 2.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase
1.End()+49
  System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult的   asyncResult)+34
  System.Web.Mvc.Async.AsyncInvocationWithFilters.b__3c()   +50 System.Web.Mvc.Async。&lt;&gt; c__DisplayClass45.b__3e()   +225 System.Web.Mvc.Async。&lt;&gt; c__DisplayClass30.b__2f(IAsyncResult asyncResult)+10
  System.Web.Mvc.Async.WrappedAsyncResult 1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase
1.End()+49
  System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult的   asyncResult)+34
  System.Web.Mvc.Async&LT;&GT; c__DisplayClass28.b__19()   +26 System.Web.Mvc.Async。&lt;&gt; c__DisplayClass1e.b__1b(IAsyncResult)   asyncResult)+100
  System.Web.Mvc.Async.WrappedAsyncResult 1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase
1.End()+49
  System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult的   asyncResult)+27
  System.Web.Mvc.Controller.b__1d(IAsyncResult的   asyncResult,ExecuteCoreState innerState)+13
  System.Web.Mvc.Async.WrappedAsyncVoid 1.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase
1.End()+49
  System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)+38   System.Web.Mvc.Controller.b__15(IAsyncResult的   asyncResult,控制器控制器)+12
  System.Web.Mvc.Async.WrappedAsyncVoid 1.CallEndDelegate(IAsyncResult asyncResult) +22
System.Web.Mvc.Async.WrappedAsyncResultBase
1.End()+49
  System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)+28
  System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult的   asyncResult)+10
  System.Web.Mvc.MvcHandler.b__4(IAsyncResult的   asyncResult,ProcessRequestState innerState)+21
  System.Web.Mvc.Async.WrappedAsyncVoid 1.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase
1.End()+49
  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()   +545 System.Web.HttpApplication.ExecuteStep(IExecutionStep step,Boolean&amp; completedSynchronously)+155

1 个答案:

答案 0 :(得分:0)

检查您的连接字符串是否设置正确。