OWIN on Umbraco 7.2.6 - UmbracoContext.Current is always null
Hi all,
I have managed to start OWIN with the following configuration.
public class Startup
{
public void Configuration(IAppBuilder app)
{
var config = new HttpConfiguration();
config.MapHttpAttributeRoutes();
app.UseWebApi(config);
config.EnsureInitialized();
}
}
And the controller:
[RoutePrefix("menu")]
public class MenuController : UmbracoApiController
{
[HttpGet]
[Route("get")]
public MenuResponse GetMenu()
{
var uHelper = new UmbracoHelper(UmbracoContext.Current); // Exception: Value cannot be null
}
}
BUT! The UmbracoContext.Current is always null.
We are using Umbraco V7.2.6 and it's not possible to use Umbraco.Web.UmbracoDefaultOwinStartup.
Is there a chance to make UmbracoContext work on v7.2.6?
OWIN on Umbraco 7.2.6 - UmbracoContext.Current is always null
Hi all,
I have managed to start OWIN with the following configuration.
And the controller:
BUT! The UmbracoContext.Current is always null.
We are using Umbraco V7.2.6 and it's not possible to use Umbraco.Web.UmbracoDefaultOwinStartup.
Is there a chance to make UmbracoContext work on v7.2.6?
I have the same problem and, can anyone help me resolve this issue
is working on a reply...