Is possible to integrate orchard to existing Asp.Net MVC3 site like separate area?
Like this:
Web.proj
- View
- Controllers
- Models
- BackendArea
- OrchardCMS files
As a result Orchard CMS will be using for storing resources (strings, images ets.) of main site and easy to manage resources.
Problems:
I don't whant to use virtual folders on IIS.
Orchard CMS used own Global.asax, web.config, earl开发者_如何学Cier version of NHibernate and different IOC(Spring.net is used for main site)
Given the architecture of ASP.NET, not really or at least not cleanly. From what it sounds like, you are really just trying to use the HTTP interface of orchard in a sub-uri, which is possible by setting up a reverse proxy and forwarding requests to a different app living on a different site. See carlosag's article for a basic overview. Here are some protips:
- make sure you ignore the route you are going to reverse proxy -- you don't want ASP.NET mvc kicking in and trying to route it.
- Use a virtual directory on the main site where you are reverse proxying. This is where you setup the url rewrites and such.
- Setup the orchard "site" running in a virtual directory under your fake site with the same name as your virtual directory -- helps fool IIS into building URLs correctly.
The other way around will be a lot more likely to succeed. What you describe was a non-goal for Orchard.
精彩评论