Merging Orchard with existing MVC Application

Topics: Administration, Customizing Orchard, General, Installing Orchard, Localization, Writing modules, Writing themes
Nov 27, 2014 at 5:39 AM
I have an MVC application which is already developed. Now I am considering to add a blogging featuring for my website and try merging orchard with my existing website. Can someone help me with this.
Nov 30, 2014 at 5:57 PM
This is not something simple. The first question would be what you have in mind about merging, i.e. how should the result look like.

The other way around, i.e. merging your application into Orchard seems easier: you just have to convert your areas into Orchard modules (which should be as simple as adding a Module.txt) and add any global configuration (e.g. Web.config) to Orchard from the MVC app. There is still more, but I think if you want to have a single app in the end this direction is easier.

Another option would be to have two completely separated apps and e.g. run your Orchard-powered blog under, separately from your app.
Dec 1, 2014 at 4:18 AM
Thank for the reply,
I don't want to merge my app into orchard, I already have many areas in my app, services are there. Its a bit complex and heavy website. I want to add orchard into a subfolder e.g blog and then want to run my blogs using orchard like

I Placed orchard into the sub folder but the problem i am getting is the conflict of the web.config files of both. Is there any way to get this conflict resolved.
Dec 1, 2014 at 6:55 AM

I had the similar trouble. In my case, Orchard is the main site and my app, an webforms site, is the older app placed into a subfolder.
For to avoid conflicts with web.configs, namespaces, etc. you should use:
<?xml version="1.0"?>
    <location path="." inheritInChildApplications="false"> 
        <!-- Stuff that shouldn't be inherited goes in here -->
Look at the stackOverflow post where the fragment code come from:

One consideration more. probabily, you must "merge" the global.asax files.

Hope this helps :)
Dec 1, 2014 at 7:03 AM

This actually helped me.
I added orchard in a subfolder with the name 'blog'. I added the following three lines in the orchard web.config file and it worked.
Marked as answer by KhurramRaftaz on 12/1/2014 at 2:20 AM