-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from arichika/develop
1.0.3
- Loading branch information
Showing
48 changed files
with
405 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,28 +16,28 @@ This is an example to implement a OracleDatabase store for ASP.NET Identity 2.0 | |
|
||
Steps to run project | ||
|
||
- Open project in VS with Update 2 or later installed | ||
- Open project in Latest Visual Studio 2017 or later installed | ||
- Build project to restore packages and build project | ||
- In the solution, add a new one ASP.NET project with MVC and Individual Authentication | ||
- Uninstall Microsoft.AspNet.Identity.EntityFramework package from the web application | ||
- Update connection string to use the OracleDatabase database as needed | ||
- Make the file "MyConnectionStrings.config" into the project SampleWebSite's root folder | ||
- e.g. | ||
``` | ||
- Make the file `MyConnectionStrings.config` into the project SampleWebSite's root folder | ||
- e.g. | ||
``` | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<connectionStrings> | ||
<add name="DefaultConnection" | ||
connectionString="Data Source=OracleDbTnsName; User Id=scott;Password=tiger;" | ||
providerName="Oracle.DataAccess.Client" /> | ||
</connectionStrings> | ||
``` | ||
``` | ||
- In the IdentityModel.cs (in the SampleWebProject), | ||
let ApplicationUser class extend from Identity user in AspNet.Identity.Oracle | ||
- e.g | ||
``` | ||
- e.g | ||
``` | ||
using AspNet.Identity.Oracle; | ||
// using Microsoft.AspNet.Identity.EntityFramework; | ||
``` | ||
``` | ||
- ApplicationDbContext extend from OracleDatabase and the contructor take a single parameter with the connectionstring name | ||
``` | ||
public class ApplicationDbContext : OracleDatabase | ||
|
@@ -61,18 +61,17 @@ var manager = new ApplicationRoleManager(new RoleStore<IdentityRole>(context.Get | |
you can write some code block at the InitializeDb method or InitializeIdentity method | ||
in the ApplicationDbInitializer class (in the IdentityConfig.cs) | ||
- This SampleWebSite project enabled initial admin account as shoen below | ||
``` | ||
``` | ||
const string name = "[email protected]"; | ||
const string password = "Admin@123456"; | ||
const string roleName = "Admin"; | ||
``` | ||
``` | ||
- Before you do debugging, you must create the tables in the database. | ||
Please run DDL Script, "OracleIdentity.sql.txt" in the AspNet.Identity.Oracle project. | ||
Please run DDL Script, `OracleIdentity.sql.txt` in the AspNet.Identity.Oracle project. | ||
|
||
- If you have an error appears at the start of debugging, please try the following below. | ||
- To start the Visual Studio by "Run as Administrator". | ||
- Debugging on the "Local IIS" not "IIS Express". | ||
- Check build platform Win32 or x64, this project and installed ODP.NET. | ||
- Debugging on the `IIS Express`. | ||
- Check build platform Win32 or x64, this project and installed ODP.NET. (means Not Oracle.ManagedAccess) | ||
|
||
|
||
Notice | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.