IIS Deployement failed

Feb 4, 2011 at 8:34 AM

Hello,

I have installed Orchard on my PC. If I start the project within visual with cassini, everything is OK.

Now, I would like to deploy on my local IIS, so I go to the project property page  and I create an application Orchard.Web. When I run the project I have the following error, that disappear if I reswicth on the Visual Studio server.

Many thanks for you help

Chris

Server Error in '/Orchard.Web' Application.

None of the constructors found with policy 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Security.Authorizer' can be invoked with the available services and parameters:
Constructor 'Void .ctor(Orchard.Security.IAuthorizationService, Orchard.UI.Notify.INotifier, Orchard.IWorkContextAccessor)' parameter resolution failed at parameter 'Orchard.Security.IAuthorizationService authorizationService'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: Autofac.Core.DependencyResolutionException: None of the constructors found with policy 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Security.Authorizer' can be invoked with the available services and parameters:
Constructor 'Void .ctor(Orchard.Security.IAuthorizationService, Orchard.UI.Notify.INotifier, Orchard.IWorkContextAccessor)' parameter resolution failed at parameter 'Orchard.Security.IAuthorizationService authorizationService'.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace: 

[DependencyResolutionException: None of the constructors found with policy 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Security.Authorizer' can be invoked with the available services and parameters:
Constructor 'Void .ctor(Orchard.Security.IAuthorizationService, Orchard.UI.Notify.INotifier, Orchard.IWorkContextAccessor)' parameter resolution failed at parameter 'Orchard.Security.IAuthorizationService authorizationService'.]
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +578
   Autofac.Core.Resolving.ComponentActivation.Activate(IEnumerable`1 parameters) +89
   Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +122
   Autofac.Core.Resolving.ComponentActivation.Execute(IEnumerable`1 parameters) +255
   Autofac.Core.Resolving.ResolveOperation.Resolve(ISharingLifetimeScope activationScope, IComponentRegistration registration, IEnumerable`1 parameters) +246
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +92
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +321
   Autofac.Core.Resolving.ComponentActivation.Activate(IEnumerable`1 parameters) +89
   Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +122
   Autofac.Core.Resolving.ComponentActivation.Execute(IEnumerable`1 parameters) +255
   Autofac.Core.Resolving.ResolveOperation.Resolve(ISharingLifetimeScope activationScope, IComponentRegistration registration, IEnumerable`1 parameters) +246
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +92
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +321
   Autofac.Core.Resolving.ComponentActivation.Activate(IEnumerable`1 parameters) +89
   Autofac.Core.Resolving.ComponentActivation.Execute(IEnumerable`1 parameters) +141
   Autofac.Core.Resolving.ResolveOperation.Resolve(ISharingLifetimeScope activationScope, IComponentRegistration registration, IEnumerable`1 parameters) +246
   Autofac.Core.Lifetime.LifetimeScope.Resolve(IComponentRegistration registration, IEnumerable`1 parameters) +276
   Autofac.ResolutionExtensions.TryResolve(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) +120
   Orchard.Mvc.OrchardControllerFactory.TryResolve(WorkContext workContext, Object serviceKey, T& instance) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Mvc\OrchardControllerFactory.cs:19
   Orchard.Mvc.OrchardControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Mvc\OrchardControllerFactory.cs:52
   System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +93
   System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +305
   System.Web.Mvc.<>c__DisplayClass6.<BeginProcessRequest>b__2() +71
   System.Web.Mvc.<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a() +19
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Func`1 func) +161
   Orchard.Mvc.Routes.HttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Mvc\Routes\ShellRoute.cs:150
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +389
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +371
Coordinator
Feb 4, 2011 at 5:33 PM

You need to deploy everything, and make sure that the application pool is configured to run .NET 4.0.

Apr 17, 2011 at 12:57 AM

Hi.

I am having a similar problem deploying an upgraded Orchard to the Rackspace Cloud.  I am sure I deployed everything (I deployed everything twice now)..

The site runs locally in both iisexpress and iis 7.5 on windows 7 64bit, but I get this error on the cloud:

Please note that the last line of the error shows that the site is running on .net 4.0.

Does anyone have any ideas?  Maybe some case sensitivity in some file or class name somewhere?  The rackspace cloud file system is case sensitive..

Server Error in '/' Application.

None of the constructors found with policy 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Settings.CurrentSiteWorkContext' can be invoked with the available services and parameters:
Constructor 'Void .ctor(Orchard.Settings.ISiteService)' parameter resolution failed at parameter 'Orchard.Settings.ISiteService siteService'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: Autofac.Core.DependencyResolutionException: None of the constructors found with policy 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Settings.CurrentSiteWorkContext' can be invoked with the available services and parameters:
Constructor 'Void .ctor(Orchard.Settings.ISiteService)' parameter resolution failed at parameter 'Orchard.Settings.ISiteService siteService'.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace: 

[DependencyResolutionException: None of the constructors found with policy 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Settings.CurrentSiteWorkContext' can be invoked with the available services and parameters:
Constructor 'Void .ctor(Orchard.Settings.ISiteService)' parameter resolution failed at parameter 'Orchard.Settings.ISiteService siteService'.]
   Orchard.WarmupStarter.Starter.OnBeginRequest(HttpContext context, Action`1 registrations) in Starter.cs:20
   Orchard.Web.MvcApplication.Application_BeginRequest() in Global.asax.cs:24

[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



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Apr 17, 2011 at 1:28 PM

This issue was resolved by creating a new web site in the rackspace cloud, downloading the deployed files over ftp and re-deploying those same files.  So, this must have been an issue with the rackspace cloud itself.