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 6163691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:52:06+00:00 2026-05-23T21:52:06+00:00

I updated my MVC Views from Webforms to Razor. What I did is that

  • 0

I updated my MVC Views from Webforms to Razor.

What I did is that I rewrite manually all the code in Razor and excluded the aspx from the project. So far so good.

Now something strange is happening when I run the web site. I still get the Webforms views even if I excluded them from the project and replaced them with Razor views.

I did add this to my 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" />
         <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 added this block to my Web config from the views folder.
I also added a _ViewStart.cshtml

  • 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-23T21:52:07+00:00Added an answer on May 23, 2026 at 9:52 pm

    I don’t think IIS pays any attention to .csproj files. So if your .aspx files are still in the directory, it will find them, and .aspx has precedence over .cshtml files. You’ll have to delete them or move them. (Or write your own ViewEngine, but I doubt that’s worth it for this.)

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

Sidebar

Related Questions

I had a project that I've updated from .NET 3.5 MVC v2 to .NET
In my MVC apps I normally declare a base view type that all of
I am coverting my app from webforms to mvc, at the moment i am
I have an MVC 3 page that has two partial views, one for Items
I'm coming from a WebForms world where all logic is located in the codebehind
Ok, I'm an MVC newbie coming from a webforms background, so please excuse any
I'm in the process of moving from ASP.NET WebForms to MVC, and I have
Question Updated I am building an MVC framework, for my templates and views, I
I have an ASP.Net MVC Ajax.BeginForm that submits and updates my page properly when
UPDATED: Added one more question (Question #4). Hi all, I'm building myself a custom

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.