views:

197

answers:

3

I'm creating a website using ASP.NET MVC 2 and I'm thinking of using the default AccountController and Views to take care of the Users.

The only problem is that, for all the rest, I'm using a Postgres database.

Is there a way to link The account controller to a User class defined by me?

I'm using Nhibernate to connect to the database, so I'll have a User class with whatever fields necessary.

Thanks very much.

A: 

It uses the membership provider defined in your web.config. By default, this is the SQL Server provider. You can change that, though. You could use a Postgres provider, or switch to a different authentication system like OpenID. (Authentication is different than the membership provider.)

Craig Stuntz
A: 

Use a custom membership provider for PostgresSQL like this one:

http://blog.woodchop.com/2006/09/postgresql-membership-provider-for.html

Raj Kaimal
Do you know what changes must be done to that provider so it works with NHibernate? I'm Having trouble dealing with the MembershipUser class...
JLago
+1  A: 

You might want to look at NHibernate Membership Provider project and use it as a base to build from.

Mike Glenn