2

I have an existing client-facing web site (not web application project) with about 100 active pages using Web Forms. I'd like to move to a web application project and incorporate MVC for all new pages, leaving my existing pages and structure intact.

Aside from the basic paradigm shift of working with MVC as opposed to Web Forms, what types of configuration and security issues should I watch out for when MVC is integrated?

For example, will the default behavior of the MVC routing engine cause any issues with access to the existing Web Forms pages?

Similarly, are there Web Forms configuration elements that screw with MVC routing?

iEye Aye
  • 21
  • 1

1 Answers1

3

ASP.NET MVC does not support web site template in VS.NET, it can only be Web Application. You could add required MVC assemblies to the web site project, but you will have issues with intellisense and other MVC-related functionality. See this thread.

I'd recommend to create a new MVC project from scratch. This would provide you all MVC functionalitiy and clear picture of the upgrade. Then either copy all aspx files there and run them as a part of MVC project, or keep MVC project in VS.NET clean but run it along with the old site on the server. In both cases you need to make sure that aspx would work with a new .NET framework version (depends on MVC version) and a new web.config file (which you will take from MVC project).

Community
  • 1
  • 1
user2316116
  • 6,726
  • 1
  • 21
  • 35
  • That's pretty much what I'm doing. Starting with a new web application project with core references for Web Forms and MVC, then moving files from my old web site. – iEye Aye May 01 '14 at 20:12