【问题标题】:Deploying App_Data folder to IIS in Orchard CMS在 Orchard CMS 中将 App_Data 文件夹部署到 IIS
【发布时间】:2016-08-24 16:06:52
【问题描述】:

我使用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.

__________________更新___________________

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

我不知道这台服务器缺少什么来运行 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

【问题讨论】:

  • 它应该可以与现有的“App_Data”文件夹一起使用,无需再次设置您的站点,但是您是否添加了对“App_Data”文件夹的写入权限?您是否检查了“App_Data/Sites/Default/Settings.txt”中的连接字符串?
  • 感谢您的评论,是的,已授予权限,我使用 sql ce 它没有连接字符串。我不知道还有什么要检查的
  • app_data\logs中查找完整的错误消息。
  • 谢谢,我会调查并更新问题

标签: iis deployment orchardcms


【解决方案1】:

日志包含以下错误消息:

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 引用的版本相同)。

【讨论】:

  • 谢谢,帮了大忙。我最终将 sql ce 迁移到 sql server 并改用 sql server。
猜你喜欢
  • 2012-08-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-03-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-04-08
相关资源
最近更新 更多