Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4549134
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:19:00+00:00 2026-05-21T16:19:00+00:00

I upgrade a MVC 2 project to MVC 3. It is currently a small

  • 0

I upgrade a MVC 2 project to MVC 3. It is currently a small project and I only have one controller and a few views.

However, when I attempt to create a new view using Razor, I have ran into a number of issues:

1) Even though specifying a strong typed view, and it creates the

@model IEnumerable<AcmeProject.SomeObject>

I still get the error that Validation (XHTML 1.0 Traditional): Element ‘AcmeProject.SomeObject’ is not supported.

2) CS0103: The name ‘ViewBag’ does not exist in the current context

<head>
  <title>@ViewBag.Title</title>
</head>

This is a reference to the simple Layout view

3) (no longer an issue) originally, I was getting errors about the @model first line of the Razor view I am having issues with, and I had to add the following to the view/web.config file:

<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
  <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
  <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>

<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
  <namespaces>
    <add namespace="System.Web.Mvc" />
    <add namespace="System.Web.Mvc.Ajax" />
    <add namespace="System.Web.Mvc.Html" />
    <add namespace="System.Web.Routing" />
  </namespaces>
</pages>
</system.web.webPages.razor>

I am not sure how to resolve #1 and #2 and have been unsuccessful in trying a few solutions I came across in my search. However, I am also concerned I am going to continue having problems because it is an upgrade. As with computers, upgrading is the devil’s playground. Do I just need to create a new project and migrate my files over to it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T16:19:01+00:00Added an answer on May 21, 2026 at 4:19 pm

    Make sure you have followed the steps outlined in the release notes about upgrading an ASP.NET MVC 2 project to ASP.NET MVC 3. There’s also an ASP.NET MVC 3 upgrade tool you may try.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a project built in MVC 2 [ASPX] and i upgrade them to
I have a custom login-actionfilter where that I'm trying to upgrade to mvc 2
I have upgrade my MVC2 project to MVC3 using this tool: http://blogs.msdn.com/b/marcinon/archive/2011/01/13/mvc-3-project-upgrade-tool.aspx Which is
I installed the MVC 4 beta and created a new project. The standard template
I currently have a project using EF 1 (.NET 3.5) and would like to
I am new to Azure.I have MVC application build in VS 2008. It does
I am attempting to upgrade my MVC 1 project to MVC 2 RC. We
It seems I cannot upgrade my ASP.NET MVC v1 project to be able to
For past projects(the last few have been web using asp.net mvc) we created a
We have a web app that is using MVC Preview 3. I'm new to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.