ASP.NET Membership/Role providers for Postgres?
I am creating an MVC site and would like to use the built i开发者_JAVA百科n Membership and Roles for .Net. I'm using the the .Net Data Provider for Postgresql (Npgsql), but am having trouble defining the membership defaultProvider and Postgresql connection string to connect to my local database. Can anyone help?
I have not verified this, but will be using it in a project soon. Hopefully I will have more info to follow, and it will "just work" :)
http://code.google.com/p/pgsqlprovider/
Hoping to use this software stack
Windows Server 2008
PostgreSQL
PostGIS
Castle ActiveRecord
NHibernate
NHibernate.Spatial
ASP.NET MVC 3 with Membership/Role providers
[FOLLOW UP]
I ran the NuGet command "Install-Package Nauck.PostgresSQLProvider" to install the PostgreSQL ASP.NET Membership Provider created by Daniel Nauck and Jason Sznol.
http://nuget.org/List/Packages/Nauck.PostgresSQLProvider
Project Home
http://dev.nauck-it.de/projects/aspsqlprovider
You'll need to run this SQL to create the membership tables:
http://dev.nauck-it.de/projects/aspsqlprovider/repository/revisions/master/changes/src/NauckIT.PostgreSQLProvider/DatabaseSchema.sql
Finally the web.config file will need to be updated... I used this example for direction:
http://dev.nauck-it.de/projects/aspsqlprovider/repository/revisions/master/entry/src/Example/Web.config
So far authentication works, as does hashed passwords, all thats left to test is authorization.
I was a little frustrated with the nauck version, so I wrote my own. You can try it out here it you'd like. It has unit tests and a bit of documentation.
精彩评论