Installation of second site into existing Xperience13 .core site

Support CreateStudios asked on June 21, 2022 03:20

Hi, I know the Xperience 13 installation documentation says that you cannot install an additional site along side an existing .core site (but you can with MVC) We have an existing .core(5) site that we need to add an additional site to. Does anybody have experience (no pun) with doing this on a core site? Are there any workarounds or manual ways this can be done? Thank you in advance

Correct Answer

Brenden Kehren answered on June 21, 2022 06:50

The installer won't do that for you, that's what the docs are talking about. You need to manually do the work. I'd use the installer to install a new instance and MVC site for you in a whole different directory. Then simply copy the sln and new site directly to your existing folder structure.

With this install process you need to skip installing it to IIS and say you don't have access to a database server so it only installs the code files. You'll also need to modify your new sites appsettings.json file to use the existing connection string and hash string salt. In IIS you'll have to register another MVC site. From there you should be ready to go.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on June 21, 2022 03:48 (last edited on June 21, 2022 03:51)

Where in the documentation does it say you cannot have 2 .Net Core sites in version 13? I'm not confident this is correct as we have MVC5 sites and 2 .Net Core sites running in sperate instances without issue.

0 votesVote for this answer Mark as a Correct answer

Support CreateStudios answered on June 21, 2022 04:50 (last edited on June 21, 2022 04:51)

Appreciate your interest and quick reply Brendan. I came to this idea after reading the installation documentation here: Installing Xperience | Xperience 13 Documentation

After step 9, at the bottom of the blue bubble, after explaining the steps for MVC installation it states "Installation into existing instances is NOT supported for ASP.NET Core projects."

Is this not correct? Am I able to do this or is it a matter of doing it a different way. Would love to be able to install to .core if possible. Many thanks for your assistance! Anthony

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 21, 2022 04:55

Yeah that's talking about the folder structure in which the installer adds the sites on your local machine. For a simple test, just copy the code base you have into another folder, do some namespace adjustments, and register the new site in the Experience UI with a new domain and site code name. Should run like a champ.

0 votesVote for this answer Mark as a Correct answer

Support CreateStudios answered on June 21, 2022 05:27

Thanks Brenadan! so just to be clear, as we don't yet have the new site (i.e. codebase), but, the path would be to create the new site as a standalone, and copy the new sites presentation folder into the existing .core solution, then change the namespeces etc. and register the new site in the sites app?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 21, 2022 06:04

The way the installer works is it puts not the CMS and the MVC solutions in the same main directory. So your folder structure looks something like this:

-CMS
-LIB
-NewSite (MVC code)
WebSite.sln
NewSite.sln

We never use this structure. We always put the CMS and MVC files, including the sln files, in their own directory so we can leave them in their own code repositories.

Our structure looks like this:

-ClientName
--Kentico
---CMS
---Lib
---WebSite.sln

--MVC1
---MVCSite1
---MVCSite1.sln

--MVC2
---MVCSite2
---MVCSite2.sln

I'm saying move your folders and files around so you can manage them easier long term.

0 votesVote for this answer Mark as a Correct answer

Support CreateStudios answered on June 21, 2022 06:38

Hi Brendan,

I might not have made my question clear or I might not understand your answer.

We have an existing .net core site. The structure of our Visual Studio solution is:

  • ExistingSiteFolder
  • CMS folder
  • Lib
  • ExistingSite.sln
  • webApp.sln

When it is deployed we use this structure under the sites main folder

  • CMS folder
  • WebsiteFolder

What we would like is for the VS solution structure

  • ExistingSiteFolder
  • NewSiteFolder
  • CMS folder
  • Lib
  • ExistingSite.sln
  • NewSite.sln
  • webApp.sln

For the new IIS structure

  • CMS folder
  • WebsiteFolder
  • NewSiteFolder

My question is, given that the new site does not yet exist, how do I add the NewSite folder? Do I create a new standalone site with a fresh install and simply copy it in after changing the namespaces etc. and create a new site in the Sites app, or is this done in another way.

Hope this makes sense. Thanks again

0 votesVote for this answer Mark as a Correct answer

Support CreateStudios answered on June 21, 2022 06:54

Fantastic. Thank you. That makes sense. Very much appreciate your answer!

Cheers!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.