Oracle .NET Membership & Role Providers (C#)
After building an ASP .NET system in C# for one of my clients, they decided to port their database from SQL Server to Oracle 10g. I initially assumed this would be easy, since the .NET framework contains out-of-the-box providers compatible with numerous systems. However I soon found that there were no standard role or memebership providers for Oracle below version 11g (the official Oracle providers), and that although there a couple of proprietary solutions for a cost, pretty much all the links to custom source implementations had broken or disappeared (a couple were in VB, yuck).
So after reading through the membership provider documentation and basing my code off the membership provider sample code (and equivalent role provider documentation and role provider sample code), I coded custom membership and role providers for Oracle 10g, using the OLE DB driver and objects (System.Data.OleDb). This should be fairly straightforward to port to ODBC (use the System.Data.ODBC objects and you may need to change some of the DB datatypes), and possibly ADO (though I don't have much experience with ADO so I may be wrong there).
As with the sample code from the MSDN site, all errors can be logged for debugging purposes, and viewed through the Event Viewer>Application section. This is enabled through the writeExceptionsToEventLog="true" attribute of the <add> tag within the <provider> tag in web.config.
You can enable these providers through the Security tab of the website configuration or set them to default in web.config. SQL for the tables and instructions are commented in the code.
Download:
