Embedded strongly-typed views with ASP.NET MVC
Posted
by Brian Vallelunga
on Stack Overflow
See other posts from Stack Overflow
or by Brian Vallelunga
Published on 2010-06-11T15:49:01Z
Indexed on
2010/06/11
15:52 UTC
Read the original article
Hit count: 315
asp.net-mvc
|views
I'm working on a plugin-type of system for ASP.NET MVC that loads views from an embedded assembly. I have created a VirtualPathProvider that does the work of retrieving out of the assembly. Everything is working fine except for strongly-typed views. Whenever I try to load one of those, I get an exception of: Could not load type 'System.Web.Mvc.ViewPage'.
The problem is that there is no Web.config file under the Views folder. Well, actually there is, but the system doesn't seem to want to read the embedded version. If I manually create the file under the corresponding directory in the web app, everything is fine. This isn't an acceptable workaround however, as each plugin would need its own file in its own specific directory.
Does anyone know how I might get ASP to read the embedded Web.config file?
Thanks,
Brian
© Stack Overflow or respective owner