8

I am developing a 3-tier project with authentication from scratch. I am using the following as a guide for implementing Identity authentication: http://bitoftech.net/2015/01/21/asp-net-identity-2-with-asp-net-web-api-2-accounts-management/

The issue is that I am required to install the following NuGet packages:

Install-Package Microsoft.AspNet.Identity.Owin -Version 2.1.0
Install-Package Microsoft.AspNet.Identity.EntityFramework -Version 2.1.0
Install-Package Microsoft.Owin.Host.SystemWeb -Version 3.0.0
Install-Package Microsoft.AspNet.WebApi.Owin -Version 5.2.2
Install-Package Microsoft.Owin.Security.OAuth -Version 3.0.0
Install-Package Microsoft.Owin.Cors -Version 3.0.0

I intuitively installed Microsoft.AspNet.Identity.Owin into my Presentation Layer and now the dilemma, Microsoft.AspNet.Identity.EntityFramework where does it go? I already installed EF6 into the Data Access Layer, is there a way to provide this dependency to Microsoft.AspNet.Identity.EntityFramework in the Presentation Layer?

Thufir Hawat
  • 456
  • 5
  • 15

2 Answers2

5

It should go into your web project.

Microsoft.AspNet.Identity.EntityFramework is a namespace that provides classes to easily hookup an identity project to Entity Framework. It doesn't actually provide anything for EF itself.

If you chose to use a different ORM or if you wanted to fully customize asp.net identity (say, make your own UserStore), you wouldn't even include that package in your project.

jamesSampica
  • 12,230
  • 3
  • 63
  • 85
0

Owin itself has nothing to do with presentation. It is "authentication middleware". You would probably want to install all these packages into your "logic tier" project, i.e. WebAPI.

I'd suggest you to go through first two parts of the previous version of the aforementioned guide.