0.9.253 build with httpasynchandler - TargetInvocationException was unhandled by user code error

Dec 31, 2010 at 8:29 AM

Hello,

Hope someone can help me with this. I have just Orchard for the first time. I already have MVC3 Release 2 and I used the 0.9.253 build. The projects built successfully. When I run I get the above error pointed to at the end of this method:

 

public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData) {
                _scope = _workContextAccessor.CreateWorkContextScope(new HttpContextWrapper(context));
                try {
                    return _httpAsyncHandler.BeginProcessRequest(context, cb, extraData);
                }
                catch {
                    _scope.Dispose();
                    throw;
                }
            }

Here is the stack trace that appears:

System.Reflection.TargetInvocationException was unhandled by user code
  Message=Exception has been thrown by the target of an invocation.
  Source=mscorlib
  StackTrace:
       at System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType)
       at System.RuntimeMethodHandle.InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct signature, RuntimeType declaringType)
       at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
       at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
       at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
       at Autofac.Core.Resolving.ComponentActivation.Activate(IEnumerable`1 parameters)
       at Autofac.Core.Resolving.ComponentActivation.Execute(IEnumerable`1 parameters)
       at Autofac.Core.Resolving.ResolveOperation.Resolve(ISharingLifetimeScope activationScope, IComponentRegistration registration, IEnumerable`1 parameters)
       at Autofac.Core.Resolving.ComponentActivation.Resolve(IComponentRegistration registration, IEnumerable`1 parameters)
       at Autofac.ResolutionExtensions.TryResolve(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
       at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Service service, IEnumerable`1 parameters)
       at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Service service)
       at Orchard.Environment.ShellBuilders.ShellContainerFactory.<>c__DisplayClassb.b__a(IActivatingEventArgs`1 e)
       at Autofac.Builder.RegistrationBuilder`3.<>c__DisplayClass8.b__7(Object s, ActivatingEventArgs`1 e)
       at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
       at Autofac.Core.Registration.ComponentRegistration.RaiseActivating(IComponentContext context, IEnumerable`1 parameters, Object& instance)
       at Autofac.Core.Resolving.ComponentActivation.Activate(IEnumerable`1 parameters)
       at Autofac.Core.Resolving.ComponentActivation.Execute(IEnumerable`1 parameters)
       at Autofac.Core.Resolving.ResolveOperation.Resolve(ISharingLifetimeScope activationScope, IComponentRegistration registration, IEnumerable`1 parameters)
       at Autofac.Core.Resolving.ResolveOperation.Resolve(IComponentRegistration registration, IEnumerable`1 parameters)
       at Autofac.Core.Lifetime.LifetimeScope.Resolve(IComponentRegistration registration, IEnumerable`1 parameters)
       at Autofac.ResolutionExtensions.TryResolve(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
       at Autofac.ResolutionExtensions.TryResolve(IComponentContext context, Service service, Object& instance)
       at Orchard.Mvc.OrchardControllerFactory.TryResolve[T](WorkContext workContext, Object serviceKey, T& instance)
       at Orchard.Mvc.OrchardControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType)
       at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName)
       at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)
       at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.b__2()
       at System.Web.Mvc.SecurityUtil.<>c__DisplayClassb`1.b__a()
       at System.Web.Mvc.SecurityUtil.b__0(Action f)
       at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action)
       at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust[TResult](Func`1 func)
       at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
       at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state)
       at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
       at Orchard.Mvc.Routes.ShellRoute.HttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
  InnerException: System.MissingMethodException
       Message=Method not found: 'Void System.Web.Helpers.Validation.ExcludeAll()'.
       Source=System.Web.Mvc
       StackTrace:
            at System.Web.Mvc.ControllerActionInvoker..ctor()
            at Orchard.Mvc.Filters.FilterResolvingActionInvoker..ctor(IEnumerable`1 filterProviders)
       InnerException: 

If I continue past this message I get a web page with the following message:

Method not found: 'Void System.Web.Helpers.Validation.ExcludeAll()'.
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: System.MissingMethodException: Method not found: 'Void System.Web.Helpers.Validation.ExcludeAll()'

Hope someone can give some advice with this.

Thanks,


Richard

Dec 31, 2010 at 8:48 AM

Not sure if this helps but when I check the context in the above method I see the following when I hover over context:

IsPostNotification Threw an exception of type 'System.PlatformNotSupported Exception'

'This operation requires IIS integrated pipeline mode'

 

Jan 1, 2011 at 8:10 AM

Problem fixed after I removed the VS2010 Async CTP and then reinstalled ASP MVC Release 3 manually.

I had been trying to use the web platform installer to reinstall ASP MVC3 release 2. Although it was reporting to me that it was installed it seems like that was not the case.