Kentico install to web root

Citro Digital asked on April 25, 2014 14:04

I am trying to register a site in KIM that is pointing to the root folder rather than /CMS, I am getting an error message: Specified directory does not contain a Kentico installation.

Is there any way to install Kentico and specify the install folder other than /CMS(preferably the web root) and have KIM register it properly?

Recent Answers


Filip Ligač answered on April 25, 2014 14:21

Hello Jim,

Do you have any specific reason why you do not want to map your application in IIS to ~/CMS folder? You can still set the alias to anything you want.

The only way how you could make it work is to copy all files and folders from ~/CMS to the root folder. This way you should not receive an error like that.

0 votesVote for this answer Mark as a Correct answer

Citro Digital answered on April 25, 2014 15:34

Hi Filip.

Yes. We use a control panel to maintain a large number of websites. The control panel sets the root and permissions for the site.

I did copy the files from the /CMS folder, however KIM pops up the error when trying to change the path: Specified directory does not contain a Kentico installation.

In previous versions of Kentico, we could install directly to the root and register it in KIM for great maintenance workflow. What benefit is there to deviate from this and use the ~/CMS folder in Kentico 8?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on April 25, 2014 22:30

You can modify what's registered in KIM by right clicking the row you want to edit and click Modify.

0 votesVote for this answer Mark as a Correct answer

Citro Digital answered on April 26, 2014 06:23

Hi Brenden.

I tried that and KIM pops up the error when trying to change the path: Specified directory does not contain a Kentico installation.

I then tried modifying the c:\ProgramData\KIM\kim.xml file to point the path to the root which seemed to work initially. But when applying a hotfix, KIM still uses the ~/CMS folder rather than the root to add the patch files.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on April 27, 2014 21:47

I've installed 6 different sites and changed the directory on each one without issue. Some with CMS folder and some without.

0 votesVote for this answer Mark as a Correct answer

Leandro Filipczyk answered on June 9, 2014 14:05

Guys, I am experiencing the same issue. The KIM is returning the same error message as depicted above. Can anyone please point me on the right direction? What is verified by the KIM app to return that error? Is it just because the root folder name HAS to be CMS?

Thanks!

0 votesVote for this answer Mark as a Correct answer

Leandro Filipczyk answered on June 9, 2014 15:06

Well, I was able to add the site to KIM. The short answer is that it works by copying the "lib" folder to the CMS site folder. The long answer is this:

I opened the kim.exe file using reflector, and I was able to locate the "btn_Ok" click event. There I found the relevant piece of code:

if (!CMSFilesHelper.CheckKenticoInstallation(path))
    {
        MessageBox.Show(this, base.GetString("FormRegister.NotKenticoInstallation", new object[0]), base.GetString("main.title", new object[0]), MessageBoxButtons.OK, MessageBoxIcon.Hand);
        base.DialogResult = DialogResult.None;
        return;
    }

And so the "CheckKenticoInstallation" method:

public static bool CheckKenticoInstallation(string path)
{
    CMSVersion targetVersion = CMSFilesHelper.GetTargetVersion(path, "bin");
    return (targetVersion.VersionInitialized && targetVersion.Major == 7) || CMSFilesHelper.GetTargetVersion(path, "lib").VersionInitialized;
}

It checks the "bin" folder AND the version == 7 OR the "lib" folder regardless of its version.

Could this be the issue?

Thoughts?

0 votesVote for this answer Mark as a Correct answer

Citro Digital answered on June 9, 2014 16:11 (last edited on June 9, 2014 16:11)

While not as convenient as the previous versions, we ended up pointing the physical path to the /CMS folder.

0 votesVote for this answer Mark as a Correct answer

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