3
Well friends, I created an Asp.Net MVC web project No Authentication
, but now I’m in need of authentication.
I’m following some tutorials like that to put authentication from scratch, but after installing the Entityframework and OWIN had problems running the project:
No owin.Environment item was found in the context.
Description: An untreated exception occurred during the execution of the current web request. Examine stack tracking to get more information about the error and where it originated in the code.
Details of the Exception: System.Invalidoperationexception: No owin. Environment item was found in the context.
Does anyone know why and how I can solve this problem?
This guy here "http://stackoverflow.com/questions/22650168/no-owin-environment-item-was-found-in-the-context-only-on-server" Decided to restart the server.
– PauloHDSousa
I restarted, but unfortunately it didn’t work.
– Jedaias Rodrigues
Have you created another? If you can start a new one, choose with authentication. Expand your project’s file tree on Solution Explorer, and send an image of the contained files you created to the ASP.NET Identity.
– JamesTK
Well friend, that’s the biggest problem! I can’t create another project with Authentication and migrate my current project there. I am using Telerik and if I did that it would not work. It has to be in this project that I am already working.
– Jedaias Rodrigues
@Jedaias, ok, so try to give a better position on what you’ve done with Identity.
– JamesTK
Well, I imported (copied and pasted) the classes
IdentityModels
andAccountViewModels
of another project created using theAuthentication
, I’m also using the classesAccountController
andIdentityConfig
in the same way. But through thePackage Manager Console
installed theEntityFramwork
and theOWIN
.– Jedaias Rodrigues
To
Startup.cs
, copied?– JamesTK
There was copied no, I copied now, but the same error continues. I believe I should configure something in the
Web.config
– Jedaias Rodrigues