Orchard 1.4 installation failed with "The connection string is empty"

Topics: Installing Orchard, Troubleshooting
Mar 30, 2012 at 5:52 PM

Hi

I tried to install Orchard 1.4 from Web Matrix Beta 2 but the installation failed due to the following errors. First I got the following exception "Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it has already been disposed." with the following details

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.ObjectDisposedException: Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it has already been disposed.

Source Error:

Line 23: @if (Model.Messages != null) {
Line 24: <div id="messages">
Line 25:     @Display(Model.Messages)
Line 26: </div>
Line 27: }

after refreshing the page I got this exception

Server Error in '/' Application.

The connection string is empty

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.ArgumentException: The connection string is empty

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:

[ArgumentException: The connection string is empty]
   Orchard.Data.Providers.SqlServerDataServicesProvider.GetPersistenceConfigurer(Boolean createDatabase) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Providers\SqlServerDataServicesProvider.cs:21
   Orchard.Data.Providers.AbstractDataServicesProvider.BuildConfiguration(SessionFactoryParameters parameters) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Providers\AbstractDataServicesProvider.cs:0
   Orchard.Data.<>c__DisplayClass3.<BuildConfiguration>b__2() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\SessionFactoryHolder.cs:94
   Orchard.Data.SessionConfigurationCache.GetConfiguration(Func`1 builder) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\SessionConfigurationCache.cs:51
   Orchard.Data.SessionFactoryHolder.BuildConfiguration() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\SessionFactoryHolder.cs:93
   Orchard.Data.SessionFactoryHolder.GetConfiguration() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\SessionFactoryHolder.cs:71
   Orchard.Data.SessionFactoryHolder.BuildSessionFactory() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\SessionFactoryHolder.cs:83
   Orchard.Data.SessionFactoryHolder.GetSessionFactory() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\SessionFactoryHolder.cs:61
   Orchard.Data.SessionLocator.For(Type entityType) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\SessionLocator.cs:29
   Orchard.Data.Repository`1.get_Session() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Repository.cs:26
   Orchard.Data.Repository`1.get_Table() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Repository.cs:30
   Orchard.Data.Repository`1.Fetch(Expression`1 predicate) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Repository.cs:126
   Orchard.Data.Repository`1.Get(Expression`1 predicate) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Repository.cs:91
   Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Expression`1 predicate) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Repository.cs:60
   Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetDescriptorRecord() in c:\Users\sebros\My Projects\Orchard\src\Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:57
   Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetShellDescriptor() in c:\Users\sebros\My Projects\Orchard\src\Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:30
   Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\ShellBuilders\ShellContextFactory.cs:66
   Orchard.Environment.DefaultOrchardHost.ActivateShell(ShellSettings settings) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:257
   Orchard.Environment.DefaultOrchardHost.StartUpdatedShells() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:116
   Orchard.Environment.DefaultOrchardHost.BeginRequest() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:215
   Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.BeginRequest() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:78
   Orchard.Web.MvcApplication.HostBeginRequest(HttpApplication application, IOrchardHost host) in c:\Users\sebros\My Projects\Orchard\src\Orchard.Web\Global.asax.cs:38
   Orchard.WarmupStarter.Starter`1.OnBeginRequest(HttpApplication application) in C:\Users\sebros\My Projects\Orchard\src\Orchard.WarmupStarter\Starter.cs:68
   Orchard.Web.MvcApplication.Application_BeginRequest() in c:\Users\sebros\My Projects\Orchard\src\Orchard.Web\Global.asax.cs:29

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +233
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +21
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
   System.Web.Util.ArglessEventHandlerProxy.Callback(Object sender, EventArgs e) +56
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

Here are the generated log file contents

2012-03-30 19:47:02,585 [9] NHibernate.AdoNet.AbstractBatcher - Could not execute query: SELECT this_.Id as Id11_0_, this_.SerialNumber as SerialNu2_11_0_ FROM Settings_ShellDescriptorRecord this_ WHERE 1=1

System.Data.SqlServerCe.SqlCeException (0x80004005): The specified table does not exist. [ Settings_ShellDescriptorRecord ]

at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr)

at System.Data.SqlServerCe.SqlCeCommand.CompileQueryPlan()

at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options)

at System.Data.SqlServerCe.SqlCeCommand.ExecuteDbDataReader(CommandBehavior behavior)

at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()

at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd)

2012-03-30 19:47:02,602 [9] NHibernate.Util.ADOExceptionReporter - The specified table does not exist. [ Settings_ShellDescriptorRecord ]

2012-03-30 19:47:02,607 [9] NHibernate.Util.ADOExceptionReporter - The specified table does not exist. [ Settings_ShellDescriptorRecord ]


My development machine is Windows 7 Professional x64, VS 11 Beta installed.

Any suggestions?

Apr 1, 2012 at 1:31 AM

I have the same problem. My development machine is Windows 8 CP x64, VS 11 Beta and Web Matrix Beta 2 installed. :(