troygoode / MembershipStarterKit

The starter kit provides the Asp.Net MVC controllers, models, and views needed to administer users & roles.
http://github.com/TroyGoode/MembershipStarterKit
MIT License
197 stars 66 forks source link

Error with Razor Version on Web Pages #33

Closed amhedh closed 11 years ago

amhedh commented 11 years ago

I installed the app via the nugetPackage after I had setup my membership providers.

I get the same error discussed in this previous issue: https://github.com/TroyGoode/MembershipStarterKit/issues/27

amhedh commented 11 years ago

Found the problem, the web.config inside /Areas/MvcMembership/Views has a reference to MVC3 and the previous version of the razor engine:

<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">
  <controls>
    <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
  </controls>
</pages>

I fixed this by creating a new Area and copying the web.config from that folder