Thursday, February 1, 2018

asp.net mvc - What do the .config files look like in a fresh MVC 4 PRoject



I'm working on an existing MVC 4 project with Visual Studio 2015 RC1. I'm seeing the following errors in the cshtml files. With @model "The name 'model' does not exist in the current context."




Unfortunately this answer doesn't work for me, as I'm unable to create a fresh MVC 4 project with which to copy.



Can someone please post the fresh ~/Web.config and ~/Views/Web.config files for a fresh MVC 4 project?



For example at the top of the following strongly typed view...



@model ExposureTrack.Website.Models.Assessments

@{

ViewBag.Title = "Assessments";
}


I'm seeing a squiggly under @model with the error mentioned above.


Answer



~/Web.config

















































































































~/Views/Web.config








































validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"

pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

















No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...