Site structure
Version 7.x > Site structure > How to run a separate site/app alongside Kentico? View modes: 
User avatar
Member
Member
pkuhn-ipswitch - 12/10/2013 4:22:43 PM
   
How to run a separate site/app alongside Kentico?
Hi there,

My company is migrating the content of our website to Kentico, but we need to keep our forms etc running in a separate website. Ideally we would have this website running underneath Kentico - in a virtual or subdirectory. I have setup the Exlude URLs in the URL/SEO part of the CMSDesk, and can browse to static files within the secondary site. Issues arise when trying to load the dynamic pages.

The site is a .Net compiled site. I've tried running it as a Virtual Directory and as an Application (in IIS 7.5).

I've tried housing the site files inside of Kentico's root, as well as outside in inetpub.

I hit various errors with every attempt. As an Application under Kentico in IIS (and files in Kentico root), I get Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, ... as my site does not use MVC, but Kentico does.

As a Virtual Directory, with files remaining in Kentco Root, the site starts to render but errors out (Parser Error Message: The file '/Site.Master' does not exist.) while calling the first Masterpage: <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master", as that file is not in the actual root of Kentico. Copying/moving it there fails as it calls controls via the virtual path, and those won't be in the Kentico root either.

Any suggestions on what I might be missing, or detailed examples of deploying a secondary site within Kentico would be much appreciated. Thanks,

pete

User avatar
Member
Member
kentico_sandroj - 12/10/2013 5:48:56 PM
   
RE:How to run a separate site/app alongside Kentico?
Hello,

According to the documentation, the correct approach for having the application in a sub-folder is to create a virtual directory for it. You mentioned that you tried creating a VD but it is not clear if that was while the application was in the sub-folder; would it be possible to confirm?

Best Regards,
Sandro

User avatar
Member
Member
pkuhn-ipswitch - 12/10/2013 8:02:09 PM
   
RE:How to run a separate site/app alongside Kentico?
Hi Sandro,

Sorry, yes - that is how I had it setup.
My folder is "app" - and it is located under out dev install of Kentico on the server here:

C:\inetpub\kenticodev\www\app

I then created a virtual directory for the Kenticodev site, pointing to the "app" folder.

This is when I run into the Masterpage issues - "Parser Error Message: The file '/Site.Master' does not exist. "

Thanks-
pete

User avatar
Member
Member
kentico_sandroj - 12/17/2013 4:20:34 PM
   
RE:How to run a separate site/app alongside Kentico?
Hi Pete,

Please let us know if FroggEyes suggestions helped with this issue. If not, we may have a few additional suggestions.

Best Regards,
Sandro

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 12/13/2013 6:38:54 AM
   
RE:How to run a separate site/app alongside Kentico?
I have a nested DotNetNuke and AspDotnetStoreFront install in a 7.0.41 install and had to have several
<location path="." inheritInChildApplications="false">
tags included in my Kentico web.config file. I also had to modify the web.config of the two sub apps. They were different for each instance but an example would removing a module
<system.webServer>
<modules>
<remove name="XHtmlModule"/>
<remove name="CMSApplicationModule"/>
</modules>
</system.webServer>
I'm not saying removing these modules will fix your solution but it helped me. It was different for both applications as well.

This method did cause some issues with the KIM tool but the bug did get fixed prior to 7.0.41 so it shouldn't be an issue any longer.

Good luck.
Brenden

User avatar
Member
Member
pkuhn-ipswitch - 12/18/2013 9:30:16 AM
   
RE:How to run a separate site/app alongside Kentico?
Hi all,

Thanks for the replies - we ended up with a similar solution to FroggEye.. though did all the work in the new app's web.config. Used Removes and Clears .. for example (note, these are incomplete snippets):

      <assemblies>
<remove assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />


    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
<namespaces>
<clear/>
</namespaces>
</pages>
<httpModules>
<clear/>
</httpModules>
<httpHandlers>
<clear/>
</httpHandlers>


  <system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<remove name="RoleManager" />
<remove name="XHtmlModule" />
<remove name="CMSApplicationModule" />
<remove name="UrlRoutingModule" />
<remove name="Detector" />
<remove name="ErrorHandlerModule" />
</modules>
<handlers>
<remove name="MetaWeblogAPI" />
<remove name="ChartImageHandler" />
<remove name="UrlRoutingHandler" />
</handlers>


Everything is working nicely now.