Closed AymericG closed 12 years ago
Look at your web.config under the Views folder I add these entries that broke my mvc4 application
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages validateRequest="false" pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<namespaces>
<add namespace="Mvc.Mailer" />
</namespaces>
</pages>
both of those entries already existed in my config file for version 4
Thanks, I created a brand new MVC 4 project, and copy pasted the web.config in my project and added the entries specific to my project. This issue was a problem related to the migration to MVC4, not MvcMailer itself I believe.
Thanks!
@Eonasdan your web.config show MVC version 3 (System.Web.Mvc, Version=3.0.0.0) , you should change it to 4. I think this might fix the problem.
@sharique the problem was that my MVC 4 application already had those entries for v4 but mvcmailer added the nodes again for v3. I fixed the problem by removing the duplicated nodes for v3
I migrated to MVC4 and since then MVCMailer doesn't work.
Any idea on how I could fix this issue?
The view at '~/Views/[...]/Invitation.text.cshtml' must derive from WebViewPage, or WebViewPage.
I have tried to add:
@inherits System.Web.Mvc.WebViewPage
without success.