This project is read-only.

Merge MVC2 with orhcard

Topics: Administration, General, Localization
Apr 26, 2011 at 1:18 PM

Hi friends,

I have created an application by using Orchard cms. In another folder i have developed an mvc2 based application.

I want to host these both two applications under same virtual directory in iis. Will it possible?

If yes then how i can navigate from orchard application forms to mvc2 application views (forms).

How both two environments interact with each other. ( Mainly i concerned with navigation from orchard to mvc2 forms and vice versa)

Any help will be highly appreciated.





Apr 26, 2011 at 1:50 PM

Orchard is just an MVC 3 application. Orchard modules are actually implemented as MVC Areas. MVC 2 should mostly be entirely compatible with MVC 3.

So theoretically all you need to do is create a new module and copy your MVC 2 application in there. You can add the [Themed] attribute to your controller or actions and they should then participate in Orchard's theme selection process.

You can then implement any Orchard interfaces such as INavigationProvider, IRouteProvider etc. to integrate more tightly with Orchard.

Apr 27, 2011 at 5:47 AM

Thanks alot Randompete

I appreciate your response. My problem is still there. I don't want to merge mvc2 application in Orchard application. I don't want to create any module in Orchard.

I just want to place both applications in different folders(in single virtual directory) in IIS. So that it will start working.

Firstly i am facing problem when i place both folders under same virtual directory. It is not working there.

Second problem how i can communicate from one application to another.

Apr 27, 2011 at 5:52 AM

Making a module is the only way to do that, but as Pete said, it's extremely easy to do.