3

Is there a way to have a web site with some pages in ASP .NET MVC project and other (legacy pages) in ASP .NET Webforms in a way that the navigation is quite transparent to the final user?

Also, what happends with the URL?

I can't use a mix of web forms and mvc in the same project (althought i know it's possible)

Architecture

I want to use this approach to make the transition from web forms to mvc easier and whenever a new page is added put that page on the mvc project without affecting the current web forms working project.

0

2 Answers 2

4

Not really. One project = one website. You can technically deploy one or the other as a virtual application under the other, but this would still be two separate websites. They'd come up under the same domain/subdomain, but they would not be able to communicate with each other in terms of routing and such, i.e. there would be no way to get a URL for something in your MVC project from your Web Forms project.

MVC is backwards-compatible with Web Forms, so that you can migrate over to MVC in-place. In other words, you can add the MVC Nuget packages to a Web Forms project and start working with MVC in that same project while maintaining your existing Web Forms pages. That is how you do an upgrade. If you don't want to do it that way, your MVC site will have to be its own thing, hosted separately.

Sign up to request clarification or add additional context in comments.

Comments

0
  • You can host the state in a SQL Server shared between the sites.
  • You can have URLs in DB to have them in-sync between the sites. A start-up script of the MVC app could register its URLs automatically using the route collection.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.