Integrate Orchard with existing asp.net web forms site

Topics: Customizing Orchard, General
Mar 31, 2012 at 8:02 PM
Edited Mar 31, 2012 at 8:09 PM

I have an existing .NET 3.5 ASP.NET web forms site that connects to a SQL Server database on the backend and I need to add CMS functionality.  I want to do this with Orchard.  The existing site has maybe 10 pages that all have data entry/display functionality, and there are business logic and data layers with very little non-UI code in the aspx pages - ObjectDataSource server controls are used to manage data in the aspx pages.  

I do not want to rewrite all these web forms in MVC and/or Orchard, but I do want to create a new Orchard CMS site and integrate parts of the existing site.  I have a VPS and complete control over IIS if needed.  I have read a few posts on how to add aspx handlers in the web.config, but I think I might need to do more than that?

Is it possible to run as 2 separate websites in IIS and have the orchard site and web forms site appear as though they are the same site (i.e. have the same domain)?

What are my options to achieve this?

Developer
Mar 31, 2012 at 8:21 PM
Edited Mar 31, 2012 at 8:21 PM

Web Forms pages will execute entirely without Orchard driving it, and will simply be served by the ASP.NET Web Forms handler directly. You could work with popups, iframes or even AJAX though. Or, redirect between Orchard and Web Forms pages. In any case, it's not going to be a smooth integration between the two (nor is Orchard intended to do so), and it's definitely not going to work right out of the box.

Perhaps it would be possible to write a custom module that can execute and integrate Web Forms pages (like Umbraco). Or not. But it would be interesting to try, no? :)

Just curious: why choose Orchard (an MVC based CMS) over Umbraco (a Web Forms based CMS), since you're not willing to refactor your forms into MVC?

Developer
Mar 31, 2012 at 8:23 PM
tone33 wrote:

Is it possible to run as 2 separate websites in IIS and have the orchard site and web forms site appear as though they are the same site (i.e. have the same domain)?


You could do so by creating 3 sites: 1. will be a big IFRAME that covers the entire window. 2. could be the Orchard site and 3. your Web Forms app. Then it's just a matter of duplicating the look & feel of your two apps.

Mar 31, 2012 at 8:28 PM

ok thanks I'll look into Umbraco, or perhaps writing a custom module.  Maybe I'll even end up refactoring if this proves to be too challenging.

I really want to move this site to MVC at some point to be able to render to multiple devices (latop, tablet, mobile).  Since Orchard is MVC I thought it might be a good time to try to move that direction in part, and then convert the rest of the site at a later time.

Mar 31, 2012 at 8:33 PM
sfmskywalker wrote:
tone33 wrote:

Is it possible to run as 2 separate websites in IIS and have the orchard site and web forms site appear as though they are the same site (i.e. have the same domain)?


You could do so by creating 3 sites: 1. will be a big IFRAME that covers the entire window. 2. could be the Orchard site and 3. your Web Forms app. Then it's just a matter of duplicating the look & feel of your two apps.

ah!  makes sense - this may solve my issue.  Assuming I don't need to pass authentication between the sites...and i don't think i want to right now as I have a somewhat custom implementation of asp.net membership and roles on the web forms site.