简体   繁体   中英

Shifting Web Forms web site to Web Forms/MVC web application, what gotchas (config, security) do I need to look out for?

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?

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM