How to solve error with OWIN?

3

Well friends, I've created an Asp.Net MVC web project with No Authentication , but now I'm in need of authentication.

I'm following some tutorials like this to put authentication from scratch, but after installing EntityFramework and OWIN I had problems running the project:

  

No owin.Environment item was found in the context.

     

Description : An unhandled exception occurred during the execution of the   current Web request. Examine the stack trace for   more information about the error and where it originated in the code.

     

Exception Details: System.InvalidOperationException: In the owin.Environment item was found in the context.

Does anyone know why and how can I resolve this issue?

    
asked by anonymous 02.06.2015 / 15:57

2 answers

0

You need to create a Statup Class:

    
04.09.2015 / 22:05
0
  • Check for a Startup Class in your project;
  • Verify that the Startup Class has the following annotation before the class declaration:

    [assembly: OwinStartupAttribute(typeof(MeuProjeto.Startup))]
    
04.09.2015 / 22:16