ASP.NET Home  Home RSS 2.0 Atom 1.0 CDF  

Manuel Abadia's ASP.NET stuff - Update to my NHibernate Custom Membership and Role Providers

 
 Friday, August 01, 2008

The changes from v1.2 to the current one (v2.0) are:

  • Now using NHibernate 2.0.0 CR1.
  • Fixed a bug that caused the provider to look for the configuration settings only in the nhibernate config section. If you configured NHibernate using the hibernate-configuration section, it didn't work.
  • Fixed a bug that prevented hashed passwords to work without supplying a password answer.
  • Some code refactoring/clean up.
  • Removed all FXCop warnings.
  • Changed the mapping generation for the NHCustomMembershipProvider. In NHiberante 2.0.0 CR1, it is not possible to create mappings programatically as before, so now a xml document with the mapping is created.
  • Fixed a bug in ChangePassword and ResetPassword methods that made the stored password answer useless if the provider was using hashed format with password salt.

From some questions/emails I've got, it seems that some people aren't using the provider the way it was designed. There is no need to modify the code in the provider to support custom fields for your Users or Roles. I have created a sample that uses all the fields in the membership provider and adds some custom fields to show how the provider should be used. The sample also uses the CreateUserExWizard control in order to create an user.

As always, feedback is welcome. It has been tested only in SQL Server 2005. Let me know if you try it in other databases.

The binaries and source code can be downloaded here

 

Friday, August 01, 2008 7:10:15 PM (Romance Daylight Time, UTC+02:00)  #    Comments [2]    |   | 
Monday, August 18, 2008 10:11:49 PM (Romance Daylight Time, UTC+02:00)
Hi Manuel,

I've just found your blog via the NHibernate criticism article;)
One question though, on m. and u. provider - have you looked on (now I think abandoned) codeplex project?
http://www.codeplex.com/nhibernateprovider

how does it differs from yours, any plans to put yours there to replace it or join it? More on Leo's blog here:
http://lvildosola.blogspot.com/2007/02/nhibernateprovider-moves-to-codeplex.html

adding a profile provider to your project would be nice although there is some work there aswell.

Anyway thanks for excellent work, I'm going to try it...
Tuesday, August 19, 2008 5:45:07 PM (Romance Daylight Time, UTC+02:00)
cowgaR,

I don't know what is the status or the features of the provider at codeplex. Also, there is no plan to put my provider there or to integrate with it in any way.

A profile provider is something that I don't use very much but I wanted to do for completion. However, as my free time is very limited, it is at the very bottom of my TO-DO list.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Copyright © 2008 Manuel Abadia. All rights reserved.