ASP.NET Membership and Role Provider using Oracle database part 1

We all know that in ASP.NET 2.0 there are Built-In Providers to help developers to build a robust application.

  • Membership
  • Role management
  • Site map
  • Profile
  • Session state
  • Web events
  • Web Parts personalization
  • Protected configuration

What i want to write here is about Membership Provider and Role Provider,

Membership
System.Web.Security.ActiveDirectoryMembershipProvider
System.Web.Security.SqlMembershipProvider

Role management
System.Web.Security.AuthorizationStoreRoleProvider
System.Web.Security.SqlRoleProvider
System.Web.Security.WindowsTokenRoleProvider

 

OK, how about developer with Oracle database in their hand? Off course ASP.NET have their API for that, for example Membership Provider, according to http://msdn.microsoft.com/en-us/library/system.web.security.sqlmembershipprovider.aspx the Inheritance Hierarchy from System.Web.Security.SqlMembershipProvider is:

System.Object
  System.Configuration.Provider.ProviderBase
    System.Web.Security.MembershipProvider
      System.Web.Security.SqlMembershipProvider

From that information, we have enough material to build our Membership Provider, let say Erudeye.Web.Security.OracleMembershipProvider, the Inheritance Hierarchy maybe look like this:

System.Object
  System.Configuration.Provider.ProviderBase
    System.Web.Security.MembershipProvider
      Erudeye.Web.Security.OracleMembershipProvider

Done, we have a vision for the Provider, how about persistent data? Again, we "copy" SQL Server Provider schema structure from SqlMembershipProvider.

aspnetProviderSchema

The table above is specific to each Provider, some table are use by Membership and Role Provider. When we want to "copy" the database schema, bringing that picture only is not enough, we need to know exactly what information behind that, like data type, constraint and so on. The complete query from schema above could be found on C:\Windows\Microsoft.NET\Framework\v2.0.50727 with the .sql filetype. From that query, we could make our own Oracle schema, example for aspnet_Users table in Oracle way:

ora_aspnet_users

We already have the vision about Provider and the Persistent data is ready, what next on part 2? Build an Oracle Provider and Provider Helper for Oracle.

8 Comments

Comments have been disabled for this content.