Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Upgrading to the latest MVC causes error
Message
De
23/02/2015 12:30:57
 
 
Information générale
Forum:
ASP.NET
Catégorie:
MVC
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01615733
Message ID:
01615738
Vues:
31
>Hi everybody,
>
>We upgraded the project to the latest MVC (and other packages to the latest) and now we are unable to run the application. The error comes from the
>
>routes.MapMvcAttributeRoutes(); method in the RouteConfig class and the error is
>
>Exception Details: System.ArgumentException: Cannot call action method 'System.Web.Mvc.PartialViewResult ErrorView[T](T, System.String, System.String, System.String)' on controller 'SysManager.Web.Areas.AccountingAudit.Controllers.PaymentTypesController' because the action method is a generic method.
>Parameter name: methodInfo
>
>Source Error:
>
>
>Line 14: routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
>Line 15:
>Line 16: routes.MapMvcAttributeRoutes();
>Line 17:
>Line 18: AreaRegistration.RegisterAllAreas();
>
>Source File: c:\_Siriusware\Main\SysManager\SysManager.Web\App_Start\RouteConfig.cs Line: 16
>
>Stack Trace:
>
>
>[ArgumentException: Cannot call action method 'System.Web.Mvc.PartialViewResult ErrorView[T](T, System.String, System.String, System.String)' on controller 'SysManager.Web.Areas.AccountingAudit.Controllers.PaymentTypesController' because the action method is a generic method.
>Parameter name: methodInfo]
>   System.Web.Mvc.ReflectedActionDescriptor..ctor(MethodInfo methodInfo, String actionName, ControllerDescriptor controllerDescriptor, Boolean validateMethod) +336
>   System.Web.Mvc.ReflectedActionDescriptor..ctor(MethodInfo methodInfo, String actionName, ControllerDescriptor controllerDescriptor) +45
>   System.Web.Mvc.Async.<>c__DisplayClass4.<GetActionDescriptorDelegate>b__2(String actionName, ControllerDescriptor controllerDescriptor) +73
>   System.Web.Mvc.Routing.AttributeRoutingMapper.GetActionDescriptors(ReflectedAsyncControllerDescriptor controller) +240
>   System.Web.Mvc.Routing.AttributeRoutingMapper.AddRouteEntries(SubRouteCollection collector, IEnumerable`1 controllerTypes, IInlineConstraintResolver constraintResolver, IDirectRouteProvider directRouteProvider) +201
>   System.Web.Mvc.Routing.AttributeRoutingMapper.MapAttributeRoutes(RouteCollection routes, IEnumerable`1 controllerTypes, IInlineConstraintResolver constraintResolver, IDirectRouteProvider directRouteProvider) +333
>   System.Web.Mvc.Routing.AttributeRoutingMapper.MapAttributeRoutes(RouteCollection routes, IInlineConstraintResolver constraintResolver, IDirectRouteProvider directRouteProvider) +397
>   System.Web.Mvc.Routing.AttributeRoutingMapper.MapAttributeRoutes(RouteCollection routes, IInlineConstraintResolver constraintResolver) +192
>   System.Web.Mvc.RouteCollectionAttributeRoutingExtensions.MapMvcAttributeRoutes(RouteCollection routes) +123
>   SysManager.Web.RouteConfig.RegisterRoutes(RouteCollection routes) in c:\_Siriusware\Main\SysManager\SysManager.Web\App_Start\RouteConfig.cs:16
>   SysManager.Web.MvcApplication.Application_Start() in c:\_Siriusware\Main\SysManager\SysManager.Web\Global.asax.cs:26
>
>Do you know what should be fixed to make it work? Can you check what do you have in that class?
>
>Thanks in advance.

Hmm. Don't think this is related to the latest packages - the behaviour seems to have been that way for a long time. See:
http://stackoverflow.com/questions/2870116/cannot-call-action-method-system-web-mvc-partialviewresult-foott-on-contro

Bottom line: your ErrorView can't be generic......
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform