Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm trying to install Umbraco without using the visual interface, in order to increase my productivity.
Currently my code looks like this:
var installApiController = new InstallApiController();
var installSetup = installApiController.GetSetup();
var instructions = new Dictionary<string, JToken>();
var databaseModel = new DatabaseModel
DatabaseType = DatabaseType.SqlCe
var userModel = new UserModel
Email = "[email protected]",
Name = "My name",
Password = "somepassword",
SubscribeToNewsLetter = false
foreach (var step in installSetup.Steps)
if (step.StepType == typeof(DatabaseModel))
else if (step.StepType == typeof(UserModel))
var installInstructions = new InstallInstructions
InstallId = installSetup.InstallId,
Instructions = instructions
InstallProgressResultModel progressInfo = null;
string stepName = "";
if (progressInfo != null)
stepName = progressInfo.NextStep;
progressInfo = installApiController.PostPerformInstall(installInstructions);
catch (Exception e)
throw new Exception(stepName, e);
while (progressInfo.ProcessComplete == false);
The code fails at this line: https://github.com/umbraco/Umbraco-CMS/blob/dev-v7.8/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs#L47, and I believe it's because the ApplicationContext isnt updated for each of the installation steps (e.g. not updated after the database is created).
Is it possible to update the ApplicationContext manually after each step in the installation progress, or do I have to trigger all installation steps in separate HTTP requests?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted