umbraco 安装期间无法连接到数据库
Cannot connect to database during umbraco install
我有一个干净的项目,我正在尝试开始。我还创建了一个干净的数据库。
两者都 运行 在我的电脑上。
我可以使用 linqpad 连接到我的数据库,没有任何问题。
但是当我尝试 "customize" 并设置微软 SQL 服务器时,它显示
Could not connect to database
在控制台中,我收到 500 内部服务器错误,时间:
:62164/install/api/PostValidateDatabaseConnection
我能做什么?
编辑
尝试使用自定义连接字符串时,我得到了这个:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Umbraco.Web.Install.Controllers.InstallApiController.ExecuteStep(InstallSetupStep step, JToken instruction)
2017-09-12 09:16:22,389 [P1996/D2/T11] INFO Umbraco.Web.Install.Controllers.InstallApiController - Step completed (took 32ms)
2017-09-12 09:16:22,390 [P1996/D2/T11] ERROR Umbraco.Web.Install.Controllers.InstallApiController - An error occurred during installation step DatabaseConfigure
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Umbraco.Core.DatabaseContext.SaveConnectionString(String connectionString, String providerName)
at Umbraco.Core.DatabaseContext.ConfigureDatabaseConnection(String connectionString)
at Umbraco.Web.Install.InstallSteps.DatabaseConfigureStep.ConfigureConnection(DatabaseModel database)
at Umbraco.Web.Install.InstallSteps.DatabaseConfigureStep.Execute(DatabaseModel database)
--- End of inner exception stack trace ---
如果即使使用自定义连接字符串,您仍然收到 500 错误,我认为您的安装有问题,您应该尝试从头开始重新安装 Umbraco
我有一个干净的项目,我正在尝试开始。我还创建了一个干净的数据库。
两者都 运行 在我的电脑上。
我可以使用 linqpad 连接到我的数据库,没有任何问题。 但是当我尝试 "customize" 并设置微软 SQL 服务器时,它显示
Could not connect to database
在控制台中,我收到 500 内部服务器错误,时间:
:62164/install/api/PostValidateDatabaseConnection
我能做什么?
编辑 尝试使用自定义连接字符串时,我得到了这个:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Umbraco.Web.Install.Controllers.InstallApiController.ExecuteStep(InstallSetupStep step, JToken instruction)
2017-09-12 09:16:22,389 [P1996/D2/T11] INFO Umbraco.Web.Install.Controllers.InstallApiController - Step completed (took 32ms)
2017-09-12 09:16:22,390 [P1996/D2/T11] ERROR Umbraco.Web.Install.Controllers.InstallApiController - An error occurred during installation step DatabaseConfigure
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Umbraco.Core.DatabaseContext.SaveConnectionString(String connectionString, String providerName)
at Umbraco.Core.DatabaseContext.ConfigureDatabaseConnection(String connectionString)
at Umbraco.Web.Install.InstallSteps.DatabaseConfigureStep.ConfigureConnection(DatabaseModel database)
at Umbraco.Web.Install.InstallSteps.DatabaseConfigureStep.Execute(DatabaseModel database)
--- End of inner exception stack trace ---
如果即使使用自定义连接字符串,您仍然收到 500 错误,我认为您的安装有问题,您应该尝试从头开始重新安装 Umbraco