MongoLab.AspNet.Identity
1.0.3
dotnet add package MongoLab.AspNet.Identity --version 1.0.3
NuGet\Install-Package MongoLab.AspNet.Identity -Version 1.0.3
<PackageReference Include="MongoLab.AspNet.Identity" Version="1.0.3" />
paket add MongoLab.AspNet.Identity --version 1.0.3
#r "nuget: MongoLab.AspNet.Identity, 1.0.3"
// Install MongoLab.AspNet.Identity as a Cake Addin #addin nuget:?package=MongoLab.AspNet.Identity&version=1.0.3 // Install MongoLab.AspNet.Identity as a Cake Tool #tool nuget:?package=MongoLab.AspNet.Identity&version=1.0.3
ASP.NET MVC 5 shipped with a new Identity system (in the Microsoft.AspNet.Identity.Core package) in order to support both local login and remote logins via OpenID/OAuth, but only ships with an Entity Framework provider (Microsoft.AspNet.Identity.EntityFramework). This package is a fork of the original Identity provider for MongoDB written by: InspectorIT, jsheely, runxc1.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
-
.NETFramework 4.5.1
- Microsoft.AspNet.Identity.Core (>= 1.0.0)
- mongocsharpdriver (>= 1.8.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.3 | 4,282 | 12/17/2013 |
These instructions assume you know how to set up MongoDB within an MVC application.
Create a new ASP.NET MVC 5 project, choosing the Individual User Accounts authentication type.
Remove the Entity Framework packages and replace with MongoDB Identity:
- Uninstall-Package Microsoft.AspNet.Identity.EntityFramework
- Uninstall-Package EntityFramework
- Install-Package MongoDB.AspNet.Identity
In ~/Models/IdentityModels.cs:
- Remove the namespace: Microsoft.AspNet.Identity.EntityFramework
- Add the namespace: MongoDB.AspNet.Identity
- Remove the ApplicationDbContext class completely.
In ~/Controllers/AccountController.cs
- Remove the namespace: Microsoft.AspNet.Identity.EntityFramework
- For self hosted MongoDB: Use the UserStore constructor that takes a connection string.
- For MongoLab: Use the UserStore constructor that takes a connection string and database name.
- The empty constructor will use the DefaultConnection named connection string in web.config