London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Can we integrate already developed MVC.Area(with standard MVC) in EPiServer Solution?

Vote:
0

I just want to integrate an already devloped MVC.Area componet in our EpiServer Solution. We have already a EPiserver Solution and already two webapplication are working fine and now i just want to use the already devloped MVC.Area section as an another application in EPiServer. Is it possible or any possible solution to work-around it in our EPiServer solution?

#262117
Edited, Sep 12, 2021 15:23
Chris Sharp - Sep 13, 2021 15:48
When you say web application, do you mean a site within a multi-site Episerver solution? You already have two sites set up?
- Sep 13, 2021 15:51
Yes @Chris Sharp, absolutely.. we have two sites already and planning to add another one which is already built-in MVC Areas.
Vote:
1

Hey Rajveer! I created a blog post series on how I recently architected a multi-site solution using MVC Areas: https://www.cjsharp.com/blog/2021/01/04/multi-site-episerver-solutions-using-mvc-areas/. Without knowing what the current codebase looks like and without knowing how you are curring using MVC areas, take that blog post with a grain of salt, and use it as a general guide. :) In most cases, you shouldn't have any issues using MVC Areas to separate out a site. I think the most important part to make this work is setting the RouteData.DataTokens["area"] value in the OnActionExecuting() filter method, and it should be set to the name of your Area. You'll also notice in the blog post that you don't need MVC's out-of-the-box area routing that's generated in the RegisterArea() method.

#262168
Sep 13, 2021 15:59
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.