Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing MEF for pluggable architecture in MVC
    text
    copied!<p>Ok I got a strange issue that I hope someone could help with</p> <p>I have a MVC project based upon this demo </p> <p><a href="http://blogs.msdn.com/hammett/archive/2009/04/23/mef-and-asp-net-mvc-sample.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/hammett/archive/2009/04/23/mef-and-asp-net-mvc-sample.aspx</a></p> <p>However it has a problem when specifying a strongly typed view I get this error</p> <pre><code>Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load type 'System.Web.Mvc.ViewPage&lt;ForumData&gt;'. </code></pre> <p>I tracked it down to it having to with when you specify the path to the view like so</p> <pre><code> return View("~/Modules/Forums/Index.aspx",data); </code></pre> <p>it gives you that error but if you put the view under the normal path which in this case would be "~Views/Forum/Index.aspx .... it works fine when specifying the return like so</p> <pre><code> return View(data); </code></pre> <p>so why would it matter it obviously is something to with the way the view engine works and the fact that the controller is actually external to the application...Help please! </p> <p><strong>Edit:</strong> The ForumData is actually ForumExtention.ForumData, I made a mistake when I generated the error to cut and paste but it does the same thing no matter what.. I just needed to get the point accross..</p> <p><strong>Update:</strong> The sample in the link I provided works fine thats because its not using a strongly typed view...Check out the actual code I was playing with by downloading it from here</p> <p><a href="http://mysql.netpmg.com/MVCandMEF.zip" rel="nofollow noreferrer">http://mysql.netpmg.com/MVCandMEF.zip </a></p> <p><a href="http://mysql.netpmg.com/forumdb.zip" rel="nofollow noreferrer">http://mysql.netpmg.com/forumdb.zip</a></p> <p>Rename the foumdb.zip to *.bak it's a SQLEXPRESS 2008 DB backup. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload