Base solution for your next web application
Open Closed

No owin.Environment item was found in the context #2390


User avatar
0
omar created

When I try to run the application using "Start without debugging", I get an exception. "No owin.Environment item was found in the context". However, when I start the application in "Start debugging" the app runs without any problem.

The exception is being thrown at the account controller.

private IAuthenticationManager AuthenticationManager
        {
            get
            {
                return HttpContext.GetOwinContext().Authentication;
            }
        }

Any suggestion on how to identify this problem?


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    It seems like you have to specify full name of Startup class in order to run it in release mode. See <a class="postlink" href="http://stackoverflow.com/a/18265494/6681451">http://stackoverflow.com/a/18265494/6681451</a>