﻿using System;
using Microsoft.Owin;
using Owin;
using ReferenceApiWeblessUmbraco.Application;
using ReferenceApiWeblessUmbraco.App_Start;

[assembly: OwinStartup(typeof(OwinStartup))]

namespace ReferenceApiWeblessUmbraco.App_Start
{
    public class OwinStartup
    {
        public void Configuration(IAppBuilder app)
        {
            StartUmbracoContext();
        }

        private void StartUmbracoContext()
        {
            var application = new ReferenceApiApplicationBase();
            application.Start(application, new EventArgs());
        }
    }
}
﻿using System;
using Microsoft.Owin;
using Owin;
using ReferenceApiWeblessUmbraco.Application;
using ReferenceApiWeblessUmbraco.App_Start;
using UmbracoVault;

[assembly: OwinStartup(typeof(OwinStartup))]

namespace ReferenceApiWeblessUmbraco.App_Start
{
    public class OwinStartup
    {
        public void Configuration(IAppBuilder app)
        {
            StartUmbracoContext();
        }

        private void StartUmbracoContext()
        {
            var application = new ReferenceApiApplicationBase();
            application.Start(application, new EventArgs());

            Vault.SetOverrideContext(new UmbracoWeblessContext());
        }
    }
}
Set override Umbraco Vault context in app startup
Set override Umbraco Vault context in app startup
