I created an Orchard Website (Version 1.8)
It was created through WebMatrix.
Locally everything runs perfectly fine.
When I upload it to my server (Web Deploy also via WebMatrix) I get following Error Message:
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 Error Logs:
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
I googled a bit and most posts suggested
Check Read/Write Permissions on Default .NET AppPool user for the folders "App_Data, Modules, Media, Themes".
I checked the permissions and set them this way. Still get the excact same error though.
Any suggestions? Help would be highly appreciated.
Edit: Solved it myself, see the seconds post...
Another possible solution is to verify DB connectivity. In my case, I tried the above solutions and it still was returning the same 404 error message. In the Orchard/App_Data/logs, it showed an error that was more related to the database, along the same lines as "Could not create the driver from Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver" in the OP error message.
I realized I hadn't set the security group permissions on the RDS instance at AWS hosting to properly allow the webserver EC2 instance access to the database. Once I added the appropriate EC2 instance (security group the EC2 instances are part of actually, not just the machine), I was able to access the site without further issue.
The folder permissions are also critical, but if you try that and still not having luck, verify your database permissions are correct too!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With