Deployment issue

Topics: Installing Orchard
May 29, 2012 at 7:34 PM

I am trying to push orchard from our staging server to a separate production server. I simply copied and pasted the files from staging to prod and receive the following error.

Could not load type 'Orchard.Security.AlwaysAccessibleAttribute' from assembly 'Orchard.Framework, Version=1.3.10.0, Culture=neutral, PublicKeyToken=null'.

I can't find any reference to this type except in Orchard 1.4 and we are running 1.3. A default install of orchard using WPI does work so I am pretty sure the server has the necessary dependencies available, and IIS is setup correctly. A log file is being created but nothing is being written to it.

Server is a brand new windows 2008 R2 with .net 4 and IIS7. App pool is set to 4.0, and integrated mode

 Any help is much appreciated. Stacktrace below.

TypeLoadException: Could not load type 'Orchard.Security.AlwaysAccessibleAttribute' from assembly 'Orchard.Framework, Version=1.3.10.0, Culture=neutral, PublicKeyToken=null'.]
   System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) +0
   System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +180
   System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) +192
   System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) +115
   System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +426
   System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeMethodInfo method, RuntimeType caType, Boolean inherit) +137
   System.Reflection.RuntimeMethodInfo.GetCustomAttributes(Type attributeType, Boolean inherit) +72
   Orchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.<>c__DisplayClass3.<AttachToComponentRegistration>b__0(MethodInfo mi) +76
   System.Linq.<SelectManyIterator>d__14`2.MoveNext() +238
   System.Linq.Buffer`1..ctor(IEnumerable`1 source) +217
   System.Linq.Enumerable.ToArray(IEnumerable`1 source) +78
   Orchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.ShapeAttributeBindingModule.AttachToComponentRegistration(IComponentRegistry componentRegistry, IComponentRegistration registration) +128
   Autofac.Module.<AttachToRegistrations>b__0(Object sender, ComponentRegisteredEventArgs e) +20
   System.EventHandler`1.Invoke(Object sender, TEventArgs e) +0
   Autofac.Core.Registration.ComponentRegistry.AddRegistration(IComponentRegistration registration, Boolean preserveDefaults) +250
   Autofac.Core.Registration.ComponentRegistry.Register(IComponentRegistration registration, Boolean preserveDefaults) +41
   Autofac.Core.Registration.ScopeRestrictedRegistry.Register(IComponentRegistration registration, Boolean preserveDefaults) +74
   Autofac.Builder.RegistrationBuilder.RegisterSingleComponent(IComponentRegistry cr, IRegistrationBuilder`3 rb) +131
   Autofac.<>c__DisplayClassd.<RegisterType>b__c(IComponentRegistry cr) +17
   Autofac.ContainerBuilder.Build(IComponentRegistry componentRegistry, Boolean excludeDefaultModules) +217
   Autofac.ContainerBuilder.Update(IComponentRegistry componentRegistry) +14
   Autofac.Core.Lifetime.LifetimeScope.BeginLifetimeScope(Object tag, Action`1 configurationAction) +726
   Orchard.Environment.ShellBuilders.ShellContainerFactory.CreateContainer(ShellSettings settings, ShellBlueprint blueprint) +143
   Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings) +229
   Orchard.Environment.DefaultOrchardHost.CreateShellContext(ShellSettings settings) +187
   Orchard.Environment.DefaultOrchardHost.CreateAndActivateShells() +152
   Orchard.Environment.DefaultOrchardHost.BuildCurrent() +105
   Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.Initialize() +57
   Orchard.Web.MvcApplication.HostInitialization(HttpApplication application) +75
   Orchard.WarmupStarter.<>c__DisplayClass3.<LaunchStartupThread>b__2(Object state) +52

[ApplicationException: Error during application initialization]
   Orchard.WarmupStarter.Starter`1.OnBeginRequest(HttpApplication application) +281
   Orchard.Web.MvcApplication.Application_BeginRequest() +15

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
   System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +335
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
   System.Web.Util.ArglessEventHandlerProxy.Callback(Object sender, EventArgs e) +57
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
May 29, 2012 at 9:33 PM

Resolved. There were a couple modules with MVC4 references and the MVC4 DLLs were not included in the project.