views:

127

answers:

0

I hope this is the right place to post this. The following code fails in the latest build of the MVC futures library.

This works and correctly calls my controller:

Html.ActionLink<CreatePlayerController>(x => x.PlayerDetails(), "Click") 

This fails:

    LinkBuilder.BuildUrlFromExpression<CreatePlayerController>(null,
 Html.RouteCollection,  x => x.PlayerDetails() )

The error is:

System.InvalidOperationException: The IControllerFactory 'SF.Client.Website.StructureMapControllerFactory' did not return a controller for the name 'CreatePlayer'.

My StructureMapControllerFactory. GetControllerInstance method is never called.

Do I need to register my controller factory in some other way? It seems like the MvcFutures code is ignoring it.

ControllerBuilder.Current.SetControllerFactory(new StructureMapControllerFactory());

Thank you,

Rick