In my production code we\'re having a problem where Request.GetOwinContext() always returns null.
I setup a small test WebAPI controller to try and isolate the probl
Another cause (especially after upgrading form ASP.NET MVC4 and / or Empty WebApi Template) is missing Startup.cs file in the root of WebAPI project.
Also, make sure that you have installed Microsoft.Owin.Host.SystemWeb package.
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Owin;
using Owin;
[assembly: OwinStartup(typeof(TestMVC5.Startup))]
namespace TestMVC5
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
}
}
}