Mixing VB ASP.NET and C # ASP.MVC Projects in One Solution

Background

We are a TDD team that has inherited the legacy ASP.NET application and is trying to bring it under control, sharing problems with presentation, business, and data access, thereby improving testability. We had some success using the MVP template for recently added pages, but we are studying the MS MVC framework to see if it gives us any benefit over MVP. It is important to note that we would like the new MVC work to be in C #, and the legacy application to VB. We reviewed this blog post, which basically provides what we want, but does not allow us to enter C # code. In addition, there are several blog entries about dividing one web application into several projects that looked useful ( here )

Question

Can you create a working prototype consisting of one web application consisting of two projects (VB project by default VB and C # MVC project by default) and they work well together. I could not do this successfully (I think due to problems with routing). If you can see your web.config and global.asax files.

+3
source share
2 answers

An MVC application by default contains two important bits of code at the root of the project, and they must also exist at the root of your application:

  • Global.asax - The code behind sets all the routing.
  • Default.aspx - the code that starts MvcHttpHandler, and launches you along MVC routes

( -), - , , .

+2

MVC, . ASP.NET MVC , . , , , - MVC , , , . , , . , , MVC, , , .

-1

All Articles