简体   繁体   中英

Membership and Role Providers in ASP.NET 2.0 with non SQL Server provider?

I have quickly read (and will read with more care soon) the article of Scott Allen concerning the possibility to use an other provider of the default SQL Express or SQL Server database to use the " Membership and Role Providers " for ASP.NET.

We will soon need to open a part of our project to some client via the web and I thought about using the " Membership and Role Providers " but our database is PostGreSql.

Does any one have some experience with " Membership and Role Providers and an other database type (not SQL Server)? Is it worth it or it's a pain?

It actually fairly simple. It's basically just an interface with a handful of methods that need to be implemented, and most are fairly straight-forward.

I implemented one, in MSSQL, but using an existing membership database from another application. You can find it at http://www.codeplex.com/SnitzMember

I gave it a go on MySQL and found it to be impossible. That could be attributed to my relatively low skill, and the fact that I did it about 5 months after 2.0 release. Is it too much to write your own simple security system?

There is an alternate membership provider at: http://www.codeplex.com/SnitzMember

you should easily be able to write a custom membership provider that uses PostgreSQL as a datastore

  1. Create a class that inherits from MembershipProvider (eg PostgreSqlMembershipProvider)
  2. Implement methods and properties using classes in System.Data.Odbc, or alternatively use Npgsql ( http://pgfoundry.org/projects/npgsql )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM