Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

Removing IClientResourceRegistrator from class breaks Episerver

$
0
0

I had a block controller which implemented the IClientResourceRegistrator interface. After removing the interface from the controller class, Episerver breaks on restart with an exception like:

Specified argument was out of the range of valid values.
Parameter name: instance 'MyControllerType' with ReturnType MyControllerType cannot be cast to EPiServer.Framework.Web.Resources.IClientResourceRegistrator

The exception stems from StructureMap, and I'm guessing it's because something has been persisted to the database.

Any ideas on how to solve this without having to keep the interface implementation with an empty RegisterResources method?


Viewing all articles
Browse latest Browse all 8020

Trending Articles