gpt4 book ai didi

orchardcms - Orchard 1.8 出现 404 Not Found 错误 - 通过 Web Matrix 部署

转载 作者:行者123 更新时间:2023-12-04 18:42:10 25 4
gpt4 key购买 nike

我创建了一个 Orchard 网站(版本 1.8)

它是通过 WebMatrix 创建的。

在本地,一切都运行得很好。

当我将它上传到我的服务器(也通过 WebMatrix 进行 Web 部署)时,我收到以下错误消息:

Server Error in '/' Application.

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: /

Orchard 错误日志:
2014-05-13 08:22:07,827 [23] Orchard.Environment.DefaultOrchardHost - (null) - A tenant could not be started: Default
NHibernate.HibernateException: Could not create the driver from Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver, Orchard.Framework, Version=1.8.0.0, Culture=neutral, PublicKeyToken=null. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at System.Data.SqlServerCe.UnmanagedLibraryHelper..ctor(String fileName)
at System.Data.SqlServerCe.NativeMethodsHelper..ctor(String modulePath)
at System.Data.SqlServerCe.NativeMethods.LoadValidLibrary(String modulePath)
at System.Data.SqlServerCe.NativeMethods.LoadNativeBinariesFromPrivateFolder(String privateInstall)
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) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Bytecode\ActivatorObjectsFactory.cs:line 9
at NHibernate.Driver.ReflectionDriveConnectionCommandProvider.CreateCommand() in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Driver\ReflectionDriveConnectionCommandProvider.cs:line 35
at NHibernate.Driver.ReflectionBasedDriver.CreateCommand() in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Driver\ReflectionBasedDriver.cs:line 65
at NHibernate.Driver.SqlServerCeDriver.Configure(IDictionary`2 settings) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Driver\SqlServerCeDriver.cs:line 35
at Orchard.Data.Providers.SqlCeDataServicesProvider.OrchardSqlServerCeDriver.Configure(IDictionary`2 settings) in c:\Orchard\src\Orchard\Data\Providers\SqlCeDataServicesProvider.cs:line 78
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Connection\ConnectionProvider.cs:line 109
--- End of inner exception stack trace ---
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Connection\ConnectionProvider.cs:line 113
at NHibernate.Connection.ConnectionProvider.Configure(IDictionary`2 settings) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Connection\ConnectionProvider.cs:line 64
at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary`2 settings) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Connection\ConnectionProviderFactory.cs:line 50
at NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary`2 properties) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Cfg\SettingsFactory.cs:line 83
at NHibernate.Cfg.Configuration.BuildSettings() in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Cfg\Configuration.cs:line 1733
at NHibernate.Cfg.Configuration.BuildSessionFactory() in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Cfg\Configuration.cs:line 1264
at Orchard.Data.SessionFactoryHolder.BuildSessionFactory() in c:\Orchard\src\Orchard\Data\SessionFactoryHolder.cs:line 90
at Orchard.Data.SessionFactoryHolder.GetSessionFactory() in c:\Orchard\src\Orchard\Data\SessionFactoryHolder.cs:line 68
at Orchard.Data.SessionLocator.EnsureSession() in c:\Orchard\src\Orchard\Data\SessionLocator.cs:line 117
at Orchard.Data.SessionLocator.Demand() in c:\Orchard\src\Orchard\Data\SessionLocator.cs:line 42
at Orchard.Data.SessionLocator.For(Type entityType) in c:\Orchard\src\Orchard\Data\SessionLocator.cs:line 36
at Orchard.Data.Repository`1.get_Session() in c:\Orchard\src\Orchard\Data\Repository.cs:line 26
at Orchard.Data.Repository`1.get_Table() in c:\Orchard\src\Orchard\Data\Repository.cs:line 30
at Orchard.Data.Repository`1.Fetch(Expression`1 predicate) in c:\Orchard\src\Orchard\Data\Repository.cs:line 126
at Orchard.Data.Repository`1.Get(Expression`1 predicate) in c:\Orchard\src\Orchard\Data\Repository.cs:line 91
at Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Expression`1 predicate) in c:\Orchard\src\Orchard\Data\Repository.cs:line 60
at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetDescriptorRecord() in c:\Orchard\src\Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:line 57
at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetShellDescriptor() in c:\Orchard\src\Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:line 30
at Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings) in c:\Orchard\src\Orchard\Environment\ShellBuilders\ShellContextFactory.cs:line 66
at Orchard.Environment.DefaultOrchardHost.CreateShellContext(ShellSettings

我用谷歌搜索了一下,大多数帖子都建议
Check Read/Write Permissions on Default .NET AppPool user for the folders "App_Data, Modules, Media, Themes".

我检查了权限并以这种方式设置它们。
尽管如此,仍然会得到完全相同的错误。

有什么建议?帮助将不胜感激。

编辑:
自己解决了,看秒帖...

最佳答案

另一种可能的解决方案是验证数据库连接。就我而言,我尝试了上述解决方案,但它仍然返回相同的 404 错误消息。在 Orchard/App_Data/logs 中,它显示了一个与数据库更相关的错误,与 OP 错误消息中的“无法从 Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver 创建驱动程序”相同。

我意识到我没有在 AWS 托管的 RDS 实例上设置安全组权限以正确允许网络服务器 EC2 实例访问数据库。一旦我添加了适当的 EC2 实例(EC2 实例实际上是安全组的一部分,而不仅仅是机器),我就能够访问该站点而不会出现进一步的问题。

文件夹权限也很关键,但如果您尝试这样做但仍然没有运气,请验证您的数据库权限是否正确!

关于orchardcms - Orchard 1.8 出现 404 Not Found 错误 - 通过 Web Matrix 部署,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23624832/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com