A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
I guess I could probably rename the (controller) type after removing the interface to avoid the casting error, but I would still like to know the root cause of the problem. :)
I had a block controller which implemented the
IClientResourceRegistratorinterface. 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.IClientResourceRegistratorThe 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
RegisterResourcesmethod?