Coder Social home page Coder Social logo

Since moving to MVC4: The view at '~/Views/[...]/Invitation.text.cshtml' must derive from WebViewPage, or WebViewPage<TModel>. about mvcmailer HOT 4 CLOSED

smsohan avatar smsohan commented on August 13, 2024
Since moving to MVC4: The view at '~/Views/[...]/Invitation.text.cshtml' must derive from WebViewPage, or WebViewPage.

from mvcmailer.

Comments (4)

Eonasdan avatar Eonasdan commented on August 13, 2024

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

from mvcmailer.

AymericG avatar AymericG commented on August 13, 2024

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!

from mvcmailer.

sharique avatar sharique commented on August 13, 2024

@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.

from mvcmailer.

Eonasdan avatar Eonasdan commented on August 13, 2024

@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

from mvcmailer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.