I am about to maintain an old Web application that has WebForms projects. I need to add a new project to the application. Can it in any way be an MVC Core project? I mean, can an MVC Core project co-exist in the same application with WebForms projects?
2 Answers
ASP.NET Core does not support WebForms and the Microsoft Team has said they have no plans to port webforms to asp.net core. So no, you can't make an old webforms project into a asp.net core project.
3 Comments
Karthic G
Can you please provide Microsoft link that you mentioned as "no plan to port"
Karthic G
any updates on my questions? @Peter Kellner
bertasoft
There is a port in GitHub, please vote it github.com/CoreWebForms/CoreWebForms/issues/59 - something is moving
If you are hosting your Web Forms application in Internet Information Services (IIS) you can create a separate project for MVC Core stuff and achieve the effect of hiving one application by adding the MVC Core application as a sub application in IIS Manager.
- Open IIS Manager
- Right click the Web Forms site and select "Add Application..."
- Select the folder you published your Core MVC application to as the "Physical path".
- In the alias, enter the base path you want to use for the MVC stuff.
1 Comment
petrosmm
simple but elegant solution!
<iframe src='your/path/to/view.aspx'>in any of your other views. I think I'd only recommend this if rebuilding teh webforms side was completely out of the question and you had a good reason to not continue using webforms