Jul 19, 2012 at 3:52 PM
Edited Jul 20, 2012 at 5:24 PM
We just updated our project to the 20505 RC build.
We are using precompiled views and controllers in "plugin" DLLs, which we store in a plugin folder under our core site. We add the DLLs to the core site during pre-application init using BuildManager. We use HostingEnvironment
to register a custom VirtualPathProvider. The VirtualPathProvider allows us to resolve the controllers at runtime.
Each plugin includes a class that implements an interface which exposes any relevant "end points", basically, a controller/action combination that results in a view being rendered.
With the beta build, we were able to drop the DLLs into the plugin folder and restart IIS. The plugins would load successfully (we could read the ends points from the interface), the controller actions could be invoked and it all ticked along sweetly.
With the RC build (20505) something changed: unless I build the web site through Visual Studio (as administrator), the plugins "load" but the virtual paths to controllers/actions are no longer working. Specifically, I'm getting HTTP 404 when
I try to get to and end point.
The route works fine - it's matching and all. The assembly is being loaded, I can read from the interface and extract the end points (and thus render my menu links). But I get the 404 when I try to invoke the action on any external DLL.
The strage thing is this: If I open Visual Studio as Administrator and compile my core site project, the external DLLs just start working. The core project takes no dependencies on the plugins, so I have no idea why this works.
Does anyone have any ideas why this might be happening?