c# - How to run ASP.NET MVC project inside another ASP.NET MVC project -


let's have mvc project there root folder mvc2 and. now, want mvc project mvc2 folder , serve it.

below url should serve mvc2 project folder inside root project. root project mvc.

  • currentsite.com -> current mvc app
  • currentsite.com/mvc2/ -> should run nested mvc app.

i think there should webconfig setting should make work.

thank in advance. answer dearly appreciated.

is possible? , if , possible interact each other.

i re-consider architecture if you're having embed mvc projects within 1 another. depending on how closely related 2 are, think going in following directions:

  1. mvc areas - if both projects heavily linked, share lot of same code , resources put them 2 separate areas within application. default area routing give currentsite.com/mvc2 aswell, provided area called mvc2. approach means you'd deploy both sites (if that's need consider).
  2. separate projects - if there's not great deal of similarity between 2 , you'd prefer keep them separate, have them both sit in 1 solution , migrate common code separate class library project sits within same solution. can compile views using razorgenerator if need share views between 2 projects. approach means can deploy sites separately should need to. achieve desired url of currentsite.com/mvc2 in scenario can set virtual directory in iis.

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -