将 App_Data 文件夹部署到 Orchard CMS 中的 IIS

Deploying App_Data folder to IIS in Orchard CMS

我使用 Orchard CMS 1.10.1,我在部署现有 App_Data 文件夹时遇到问题(它已经包含一个完成的网站),我在尝试加载网站时遇到此错误

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 
Requested URL: /
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34209

当我使用新的 App_Data 时,它工作正常并显示设置页面。但是当单击完成设置按钮时,出现此错误:

Setup failed: Exception has been thrown by the target of an invocation.

________________UPDATE___________________

我将其部署到另一台服务器(在不同的托管公司)并且运行良好。

我不知道这个服务器缺少什么 运行 Orchard。 我打电话给他们,但他们不知道该怎么办。

我查看了 App_Data/logs,它就在那里:

2016-08-24 23:12:25,672 [10] Orchard.Environment.DefaultOrchardHost - (null) - A tenant could not be started: Default Attempt number: 0 [(null)]
NHibernate.HibernateException: Could not create the driver from Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver, Orchard.Framework, Version=1.10.1.0, Culture=neutral, PublicKeyToken=null. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlServerCe.SqlCeException: Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8876. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.
   at System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries()
   at System.Data.SqlServerCe.SqlCeCommand..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(Type type)
   at NHibernate.Driver.ReflectionDriveConnectionCommandProvider.CreateCommand()
   at NHibernate.Driver.ReflectionBasedDriver.CreateCommand()
   at NHibernate.Driver.SqlServerCeDriver.Configure(IDictionary`2 settings)
   at Orchard.Data.Providers.SqlCeDataServicesProvider.OrchardSqlServerCeDriver.Configure(IDictionary`2 settings)
   at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings)
   --- End of inner exception stack trace ---
   at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings)
   at NHibernate.Connection.ConnectionProvider.Configure(IDictionary`2 settings)
   at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary`2 settings)
   at NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary`2 properties)
   at NHibernate.Cfg.Configuration.BuildSettings()
   at NHibernate.Cfg.Configuration.BuildSessionFactory()
   at Orchard.Data.SessionFactoryHolder.BuildSessionFactory()
   at Orchard.Data.SessionFactoryHolder.GetSessionFactory()
   at Orchard.Data.TransactionManager.EnsureSession(IsolationLevel level)
   at Orchard.Data.TransactionManager.GetSession()
   at Orchard.Data.Repository`1.get_Session()
   at Orchard.Data.Repository`1.get_Table()
   at Orchard.Data.Repository`1.Fetch(Expression`1 predicate)
   at Orchard.Data.Repository`1.Get(Expression`1 predicate)
   at Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Expression`1 predicate)
   at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetDescriptorRecord()
   at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetShellDescriptor()
   at Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings)
   at Orchard.Environment.DefaultOrchardHost.CreateShellContext(ShellSettings settings)
   at Orchard.Environment.DefaultOrchardHost.<CreateAndActivateShells>b__41_1(ShellSettings settings)
2016-08-24 23:12:27,453 [10] Orchard.Environment.DefaultOrchardHost - (null) - A tenant could not be started: Default after 1 retries. [(null)]
2016-08-24 23:12:27,938 [10] Orchard.Environment.DefaultOrchardHost - (null) - A tenant could not be started: Default Attempt number: 0 [(null)]
NHibernate.HibernateException: Could not create the driver from Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver, Orchard.Framework, Version=1.10.1.0, Culture=neutral, PublicKeyToken=null. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlServerCe.SqlCeException: Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8876. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.
   at System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries()
   at System.Data.SqlServerCe.SqlCeCommand..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(Type type)
   at NHibernate.Driver.ReflectionDriveConnectionCommandProvider.CreateCommand()
   at NHibernate.Driver.ReflectionBasedDriver.CreateCommand()
   at NHibernate.Driver.SqlServerCeDriver.Configure(IDictionary`2 settings)
   at Orchard.Data.Providers.SqlCeDataServicesProvider.OrchardSqlServerCeDriver.Configure(IDictionary`2 settings)
   at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings)
   --- End of inner exception stack trace ---
   at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings)
   at NHibernate.Connection.ConnectionProvider.Configure(IDictionary`2 settings)
   at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary`2 settings)
   at NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary`2 properties)
   at NHibernate.Cfg.Configuration.BuildSettings()
   at NHibernate.Cfg.Configuration.BuildSessionFactory()
   at Orchard.Data.SessionFactoryHolder.BuildSessionFactory()
   at Orchard.Data.SessionFactoryHolder.GetSessionFactory()
   at Orchard.Data.TransactionManager.EnsureSession(IsolationLevel level)
   at Orchard.Data.TransactionManager.GetSession()
   at Orchard.Data.Repository`1.get_Session()
   at Orchard.Data.Repository`1.get_Table()
   at Orchard.Data.Repository`1.Fetch(Expression`1 predicate)
   at Orchard.Data.Repository`1.Get(Expression`1 predicate)
   at Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Expression`1 predicate)
   at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetDescriptorRecord()
   at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetShellDescriptor()
   at Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings)
   at Orchard.Environment.DefaultOrchardHost.CreateShellContext(ShellSettings settings)
   at Orchard.Environment.DefaultOrchardHost.<CreateAndActivateShells>b__41_1(ShellSettings settings)
2016-08-24 23:12:29,266 [10] Orchard.Environment.DefaultOrchardHost - (null) - A tenant could not be started: Default after 1 retries. [(null)]
2016-08-24 23:12:29,891 [10] Orchard.Environment.DefaultOrchardHost - (null) - A tenant could not be started: Default Attempt number: 0 [http://studiosefid.com/]
NHibernate.HibernateException: Could not create the driver from Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver, Orchard.Framework, Version=1.10.1.0, Culture=neutral, PublicKeyToken=null. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlServerCe.SqlCeException: Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8876. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.
   at System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries()
   at System.Data.SqlServerCe.SqlCeCommand..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(Type type)
   at NHibernate.Driver.ReflectionDriveConnectionCommandProvider.CreateCommand()
   at NHibernate.Driver.ReflectionBasedDriver.CreateCommand()
   at NHibernate.Driver.SqlServerCeDriver.Configure(IDictionary`2 settings)
   at Orchard.Data.Providers.SqlCeDataServicesProvider.OrchardSqlServerCeDriver.Configure(IDictionary`2 settings)
   at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings)
   --- End of inner exception stack trace ---
   at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings)
   at NHibernate.Connection.ConnectionProvider.Configure(IDictionary`2 settings)
   at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary`2 settings)
   at NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary`2 properties)
   at NHibernate.Cfg.Configuration.BuildSettings()
   at NHibernate.Cfg.Configuration.BuildSessionFactory()
   at Orchard.Data.SessionFactoryHolder.BuildSessionFactory()
   at Orchard.Data.SessionFactoryHolder.GetSessionFactory()
   at Orchard.Data.TransactionManager.EnsureSession(IsolationLevel level)
   at Orchard.Data.TransactionManager.GetSession()
   at Orchard.Data.Repository`1.get_Session()
   at Orchard.Data.Repository`1.get_Table()
   at Orchard.Data.Repository`1.Fetch(Expression`1 predicate)
   at Orchard.Data.Repository`1.Get(Expression`1 predicate)
   at Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Expression`1 predicate)
   at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetDescriptorRecord()
   at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetShellDescriptor()
   at Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings)
   at Orchard.Environment.DefaultOrchardHost.CreateShellContext(ShellSettings settings)
   at Orchard.Environment.DefaultOrchardHost.<CreateAndActivateShells>b__41_1(ShellSettings settings)
2016-08-24 23:12:31,344 [10] Orchard.Environment.DefaultOrchardHost - (null) - A tenant could not be started: Default after 1 retries. [http://studiosefid.com/]
2016-08-24 23:12:31,891 [19] Orchard.Environment.DefaultOrchardHost - (null) - A tenant could not be started: Default Attempt number: 0 [http://studiosefid.com/]
NHibernate.HibernateException: Could not create the driver from Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver, Orchard.Framework, Version=1.10.1.0, Culture=neutral, PublicKeyToken=null. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlServerCe.SqlCeException: Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8876. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.
   at System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries()
   at System.Data.SqlServerCe.SqlCeCommand..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(Type type)
   at NHibernate.Driver.ReflectionDriveConnectionCommandProvider.CreateCommand()
   at NHibernate.Driver.ReflectionBasedDriver.CreateCommand()
   at NHibernate.Driver.SqlServerCeDriver.Configure(IDictionary`2 settings)
   at Orchard.Data.Providers.SqlCeDataServicesProvider.OrchardSqlServerCeDriver.Configure(IDictionary`2 settings)
   at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings)
   --- End of inner exception stack trace ---
   at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings)
   at NHibernate.Connection.ConnectionProvider.Configure(IDictionary`2 settings)
   at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary`2 settings)
   at NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary`2 properties)
   at NHibernate.Cfg.Configuration.BuildSettings()
   at NHibernate.Cfg.Configuration.BuildSessionFactory()
   at Orchard.Data.SessionFactoryHolder.BuildSessionFactory()
   at Orchard.Data.SessionFactoryHolder.GetSessionFactory()
   at Orchard.Data.TransactionManager.EnsureSession(IsolationLevel level)
   at Orchard.Data.TransactionManager.GetSession()
   at Orchard.Data.Repository`1.get_Session()
   at Orchard.Data.Repository`1.get_Table()
   at Orchard.Data.Repository`1.Fetch(Expression`1 predicate)
   at Orchard.Data.Repository`1.Get(Expression`1 predicate)
   at Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Expression`1 predicate)
   at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetDescriptorRecord()
   at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetShellDescriptor()
   at Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings)
   at Orchard.Environment.DefaultOrchardHo

日志包含以下错误消息:

Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8876. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.

确保您安装了正确版本的 SQL Server Compact(与 Orchard 引用的版本相同)。