Activation error occurred while trying to get instance of type EPiDashboardController Exception
I've had this error a few times, usually when trying to install an existing Episerver website: 2016-11-21 14:45:15,586 ERROR  *******.Application_Error - Error caught in global.asax EPiServer.ServiceLocation.ActivationException: Activation error occurred while trying to get instance of type EPiDashboardController, key "" ---> StructureMap.StructureMapException: StructureMap Exception Code: 207 Internal exception while creating Instance 'bfa8cfc3-aae9-4405-bae7-86e03db460b8' of PluginType EPiServer.Shell.ViewComposition.IViewManager. Check the inner exception for more details. ---> System.ArgumentException: Unable to find a module by assembly '******, Culture=neutral, PublicKeyToken=null' This error prevents the editor from loading and all you see is a blank screen whenever you try and log into the editor. This error can be a bit misleading and a bit annoying, as a) the issue is never a structure map issue and b) there isn't an easy way to find out what's gone wrong. The first time I got this error it was because the CMO wasn't installed correctly. I was either missing an assembly or one of the web.config settings hadn't been applied correctly. The last time I had this error was pretty random. I needed to register my websites assembly in the modules.config, like:
<?xml version="1.0" encoding="utf-8"?> <module loadFromBin="false" name="ReloadChildren" clientResourceRelativePath="" tags="EPiServerModulePackage"> <assemblies> <add assembly="Website.Assembly" /> </assemblies> <dojo> <paths> <add name="reload-children" path="ClientResources" /> <add name="menupin" path="Scripts/MenuPin" /></paths> </dojo> <clientModule initializer="reload-children/Initializer"> <moduleDependencies> <add dependency="CMS" type="RunAfter" /> </moduleDependencies> </clientModule> </module>After adding the section to the config file, the editor started working as expected. If you've got a similar issue, then based on my experience, it's probably a plug-in/add-on issue and this is the area you should try to fix. An EPiDashboardController error means that something probably isn't registered correctly and Episerver requires some configuration information to be present in the web.config before it can be used, Episerver can't talk to something, or you have missing plug-in files, or you have the wrong version of some files. Some quick Googling found that someone has solved this issue by applying the IUSER permission to the webroot. If you are still reading this I would first try adding the assembly the exception is moaning about within a section in your module.config. If that doesn't work try going through removing anything non-standard within module.config and hopefully you should be able to find what's breaking your site!
Working With Azure?If you are working with an Azure web app and you encounter this issues, as mentioned in the comments below, by Matt. Try adding this line to your structure map config: