Rookie come, just contact MVC, see MVC5 on the default with identity authentication, the company's Oracle database, think of things can support Oracle database, toss a half day to get the following things, some things may not be too accurate, look at the Great God treatise,
Tools
1 vs2013
2 Oracle 10.2
3 OADC 12c (http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html)
I. Obtaining AspNet.Identity.OracleProvider
This thing is not an extension. Microsoft.AspNet.Identity used to support orcle authentication package, NuGet direct search can be obtained, it is recommended to go directly to GitHub download source code for easy learning and development
Download down after the proposed clean-up, remove unnecessary things, convenient for later use, the project inside the things relatively simple to see it.
Two database creation
1 Try it, so I built a user randomly.
2 Import the Build table statement, AspNet.Identity.OracleProvider project below Oracleidentity.sql, put under plsql under execution, create 5 tables
Three. Add to Project
1 new MVC5 Project (Personal identity authentication)
2 Add the AspNet.Identity.OracleProvider project to the new solution (I did it, I might expand it in the future, such as adding user-related information to the Identityuser user class, and God has a better way to modify the project.) , ask me)
Four Project modifications
Database aspects
1 Connection string modification <add name= "defaultconnection" connectionstring= "Data SOURCE=ORCL; User ID = cc; Password = cc "providername=" Oracle.manageddataaccess.client;provider "/>
2 Add Reference Oracle.manageddataaccess
Identity aspects
1 Go to AccountController, you can see that the AccountController default constructor calls the using Microsoft.AspNet.Identity.EntityFramework, which we don't use, Let's delete this reference, add the using AspNet.Identity.OracleProvider, this reference, and modify the code as follows
Public AccountController ()
: This (new usermanager<identityuser> new Userstore (New Oracledatacontext ())))
{
}
2 All ApplicationUser in the replacement class are Identityuser
3 run under test, registration, login has been used
ASP. Mvc5+oracle Identity Authentication