I want register IAuthenticationManager in Application_Start() with this code:
//
x.For<IAuthenticationManager>().Use(HttpContext.Current.GetOwinContext().Authentication);
When I run my mvc5 project I get this error
No owin.Environment item was found in the context
I believe the overload for Use that you are invoking here is attempting to resolve immediately and there is no current HttpContext during App Start. Try using the overload for Use that has a Func parameter to be used for construction.
x.For<IAuthenticationManager>().Use(ctx => HttpContext.Current.GetOwinContext().Authentication);