Upgrading to 1.5.1. HTTP 404. The resource cannot be found.

Topics: Installing Orchard
Sep 7, 2012 at 7:10 AM

Hi guys,

I am trying to upgrade my Orchard 1.3.1 site to 1.5.1. I followed the instructions given here:

http://docs.orchardproject.net/Documentation/Upgrading-a-site-to-a-new-version-of-Orchard

(Upgrading a Running Instance of Orchard...)

but keep getting the HTTP 404 error when running the site in IIS.

Could you give a hand on what the reason might be.

Thanks,

Regards.

Sep 7, 2012 at 2:21 PM

Uncheck the Read Only check box on the App_Data folder inside of your Orchard.Web project, then try to rebuild your site and run. See if that helps.

Sep 7, 2012 at 5:46 PM

There is no content, projection, etc, for the home page - alias / - you should still be able to access the site via the dashboard - /admin - and republish a content item with 'Set as home page' checked.

Sep 10, 2012 at 8:53 AM

Thanks for the hints, however, neither helps. I suspect there is some problem with the old modules installed since when I redirect the site to a fresh new database it works fine, however, when I point it to the real site database (that contains the information about the installed modules) it breaks with the HTTP 404 error. I guess there is an exception in some of the modules that breaks the whole application but have no idea what it might be. Any hint on that is appreciated.

Sep 10, 2012 at 10:27 AM

What does the log say?

Sep 10, 2012 at 11:02 AM

 

Orchard.Environment.Extensions.ExtensionManager - Error loading extension 'Orchard.Lists'System.TypeLoadException: Inheritance security rules violated by type: 'Orchard.Lists.Handlers.ContainerPartHandler'. Derived types must either match the security accessibility of the base type or be less accessible.   at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)   at System.Reflection.RuntimeAssembly.GetExportedTypes()   at Orchard.Environment.Extensions.Loaders.DynamicExtensionLoader.LoadWorker(ExtensionDescriptor descriptor) in c:\Build\Orchard\src\Orchard\Environment\Extensions\Loaders\DynamicExtensionLoader.cs:line 198   at Orchard.Environment.Extensions.ExtensionManager.BuildEntry(ExtensionDescriptor descriptor) in c:\Build\Orchard\src\Orchard\Environment\Extensions\ExtensionManager.cs:line 161   at Orchard.Environment.Extensions.ExtensionManager.<>c__DisplayClass1c.<LoadFeature>b__16(AcquireContext`1 ctx) in c:\Build\Orchard\src\Orchard\Environment\Extensions\ExtensionManager.cs:line 110   at Orchard.Caching.Cache`2.CreateEntry(TKey k, Func`2 acquire) in c:\Build\Orchard\src\Orchard\Caching\Cache.cs:line 57   at Orchard.Caching.Cache`2.AddEntry(TKey k, Func`2 acquire) in c:\Build\Orchard\src\Orchard\Caching\Cache.cs:line 27   at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateValueFactory)   at Orchard.Caching.Cache`2.Get(TKey key, Func`2 acquire) in c:\Build\Orchard\src\Orchard\Caching\Cache.cs:line 17   at Orchard.Environment.Extensions.ExtensionManager.LoadFeature(FeatureDescriptor featureDescriptor) in c:\Build\Orchard\src\Orchard\Environment\Extensions\ExtensionManager.cs:line 1092012-09-10 11:09:24,958 [7] Orchard.Environment.Extensions.ExtensionManager - Error loading extension 'Orchard.Messaging'System.TypeLoadException: Inheritance security rules violated by type: 'Orchard.Messaging.Drivers.MessageSettingsPartDriver'. Derived types must either match the security accessibility of the base type or be less accessible.   at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)   at System.Reflection.RuntimeAssembly.GetExportedTypes()   at Orchard.Environment.Extensions.Loaders.DynamicExtensionLoader.LoadWorker(ExtensionDescriptor descriptor) in c:\Build\Orchard\src\Orchard\Environment\Extensions\Loaders\DynamicExtensionLoader.cs:line 198   at Orchard.Environment.Extensions.ExtensionManager.BuildEntry(ExtensionDescriptor descriptor) in c:\Build\Orchard\src\Orchard\Environment\Extensions\ExtensionManager.cs:line 161   at Orchard.Environment.Extensions.ExtensionManager.<>c__DisplayClass1c.<LoadFeature>b__16(AcquireContext`1 ctx) in c:\Build\Orchard\src\Orchard\Environment\Extensions\ExtensionManager.cs:line 110   at Orchard.Caching.Cache`2.CreateEntry(TKey k, Func`2 acquire) in c:\Build\Orchard\src\Orchard\Caching\Cache.cs:line 57   at Orchard.Caching.Cache`2.AddEntry(TKey k, Func`2 acquire) in c:\Build\Orchard\src\Orchard\Caching\Cache.cs:line 27   at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateValueFactory)   at Orchard.Caching.Cache`2.Get(TKey key, Func`2 acquire) in c:\Build\Orchard\src\Orchard\Caching\Cache.cs:line 17   at Orchard.Environment.Extensions.ExtensionManager.LoadFeature(FeatureDescriptor featureDescriptor) in c:\Build\Orchard\src\Orchard\Environment\Extensions\ExtensionManager.cs:line 1092012-09-10 11:09:25,431 [5] Orchard.Environment.DefaultOrchardHost - A tenant could not be started: DefaultSystem.AggregateException: One or more errors occurred. ---> Orchard.OrchardException: Error while loading extension 'Orchard.Lists'. ---> System.TypeLoadException: Inheritance security rules violated by type: 'Orchard.Lists.Handlers.ContainerPartHandler'. Derived types must either match the security accessibility of the base type or be less accessible.   at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)   at System.Reflection.RuntimeAssembly.GetExportedTypes()   at Orchard.Environment.Extensions.Loaders.DynamicExtensionLoader.LoadWorker(ExtensionDescriptor descriptor) in c:\Build\Orchard\src\Orchard\Environment\Extensions\Loaders\DynamicExtensionLoader.cs:line 198

.

.

.

.

Sep 10, 2012 at 11:07 AM

Ensure that all your modules have the following @ their AssemblyInfo:

[SecurityRules(SecurityRuleSet.Level2)]

Sep 12, 2012 at 9:17 AM

Thanks man, that did it.

Sep 12, 2012 at 11:20 AM

No problem ^^

Oct 11, 2012 at 5:40 PM

Hello, I got the same problm now updating from to 1.5.1,

I added the attribute:

[SecurityRules(SecurityRuleSet.Level2)]

to two modules, the ones failing to load according to the log. However it is still failing, 404 all the time, this is the log:

012-10-11 12:26:04,545 [5] Orchard.Environment.DefaultOrchardHost - A tenant could not be started: Default
System.TypeLoadException: Could not load type 'Orchard.Core.Routable.Services.IRoutableService' from assembly 'Orchard.Core, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null'.
   at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
   at System.Reflection.RuntimeConstructorInfo.get_Signature()
   at System.Reflection.RuntimeConstructorInfo.GetParametersNoCopy()
   at System.Reflection.RuntimeConstructorInfo.GetParameters()
   at Orchard.Caching.CacheModule.b__0(ConstructorInfo x) in c:\Build\Orchard\src\Orchard\Caching\CacheModule.cs:line 16
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at Orchard.Caching.CacheModule.AttachToComponentRegistration(IComponentRegistry componentRegistry, IComponentRegistration registration) in c:\Build\Orchard\src\Orchard\Caching\CacheModule.cs:line 19
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at Autofac.Core.Registration.ComponentRegistry.AddRegistration(IComponentRegistration registration, Boolean preserveDefaults)
   at Autofac.Core.Registration.ComponentRegistry.Register(IComponentRegistration registration, Boolean preserveDefaults)
   at Autofac.Builder.RegistrationBuilder.RegisterSingleComponent[TLimit,TActivatorData,TSingleRegistrationStyle](IComponentRegistry cr, IRegistrationBuilder`3 rb)
   at Autofac.ContainerBuilder.Build(IComponentRegistry componentRegistry, Boolean excludeDefaultModules)
   at Autofac.Core.Lifetime.LifetimeScope.CreateScopeRestrictedRegistry(Object tag, Action`1 configurationAction)
   at Autofac.Core.Lifetime.LifetimeScope.BeginLifetimeScope(Object tag, Action`1 configurationAction)
   at Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings) in c:\Build\Orchard\src\Orchard\Environment\ShellBuilders\ShellContextFactory.cs:line 61
   at Orchard.Environment.DefaultOrchardHost.CreateAndActivateShells() in c:\Build\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:line 135

How should I approach this?.

Here's what I did:

  • backup my working site & database
  • unzip files from Orchard.Web.1.5.1.zip to my site's directory
  • overwrite all prompted files
  • run the site, (get myurl.com)
Coordinator
Oct 11, 2012 at 7:06 PM

You apparently missed a step from the release notes, which is to go to /admin, then navigate to the upgrade module's menu entry.