Exception when using RouteTable.Routes.MapMvcAttributeRoutes() in CMS with EpiserverForms v4.24.3

Found in

EPiServer.Forms 4.24.3

Fixed in

EPiServer.Forms 4.25.0


May 10, 2019


Jun 24, 2019


Closed, Fixed and tested


Attempt to use RouteTable.Routes.MapMvcAttributeRoutes() while having the latest version of Episerver Forms installed throws an exception.

Steps to reproduce:
1. Download the Alloy Demo Kit from github.
2. Upgrade all Nuget packages to the latest supported version.
3. In Startup.cs, add the following line: RouteTable.Routes.MapMvcAttributeRoutes();
4. Run the solution.

The site starts and displays the start page.

The site displays a YSOD with the following exception message:

Cannot call action method 'Void GetFormExternalResources(System.Collections.Generic.List`1[System.String] ByRef, System.Collections.Generic.List`1[System.String] ByRef)' on controller 'EPiServer.Forms.Controllers.FormContainerBlockController' because the parameter 'System.Collections.Generic.List`1[System.String]& scripts' is passed by reference.
Parameter name: methodInfo