Orchard is Content Management System (CMS) for managing dynamic content. It is very useful for making a dynamic site, dynamic forms etc. We had implemented site in Orchard. We wanted to implement MVCForum in orchard site for posts, comments, discussions. So we had created child application in our original site but when I tried to run child application it was giving an error of razor views.
Finally, we found that problem occurred because of Web.Config of Main ( i.e. Orchard ) project.
When we add MVCForum as child application it will also run The Web.Config of main ( i.e Orchard ) project. Orchard uses a different version of razor views DLL than MVCForum. In Order to overcome this issue, we have to set Location Path in main (i.e. Orchard ) project Web.Config which specifies not to inherit configurations in child application ( i.e. MVCForum ). So the conflict between the different version of razor views DLL will be resolved and your child application will run successfully!!
The following code shows how to set location Path for following sections in Main project Web.Config.
<location path="." inheritInChildApplications="false"> <system.web.webPages.razor> //all section code here. </system.web.webPages.razor> <system.web> //all section code here. </system.web> <system.webServer> //all section code here. </system.webServer> </location>
I hope that this article will make your orchard integration as easy as. if you are finding any difficulties with your integration then your can leave a comment below.