title: Dynamiccally load DLL with controllers and views from database, store to HDD and activate via activator
body: <p>I would like to ask if in MVC 4 exists a way how to extend MVC application dynamiccally based on external assemblies stored in database.</p>
  
  <p><strong>prerequisite</strong></p>
  
  <ol>
  <li>Each external assembly would have referenced main core assembly.</li>
  <li>Each controller would inherite base controller which would make database context from core project accessible and provide opportunity of basic functionality related to core</li>
  <li>Controller name is unique within area - core and plugins together</li>
  <li>areas would be defined in core application</li>
  <li>plugins are dependent only on core assembly which is referenced</li>
  </ol>
  
  <p><strong>Wanted scenario:</strong></p>
  
  <ol>
  <li><p>at startup an application would load all assemblies from given source - let's assume they are already present in bin folder and not referenced in main application yet.</p></li>
  <li><p>store infos about loaded assemblies into collection of info objects via reflector and register via some kind of service, from which would be external controllers callable via calling key(Controller name and action name) or some other mechanism of making them visible/accessible for core assembly. Info object would contain type reference to controller, controller name and collection of actions.</p></li>
  <li><p>when calling controller action - route filter or service would search if controller and action exists in core assembly / plugin info collection.</p></li>
  <li><p>instantiate controller / call action and pass parameters, render external view using core layout or redirect to error controller and hadle exception</p></li>
  </ol>
  
  <p>In win32 forms is this scenario realizable via activator and reflector. And when I want to update plugin all that would be needed is replacing Dll in database and restart IIS. </p>
  
  <p>Maing goal is to create possibility of developing plugins without having to change or redeploy core application to the server and make new plugin work just via uploading it to database / bin folder. Is this approach realizable in MVC 4 or everything in MVC application must be strong typed and strong referenced? </p>
  
  <p>If yes do you know about some working example of loading external controller to core application without referencing it before launch and callable, just simple example? </p>