Blog Home  Home Feed your aggregator (RSS 2.0)  
Update to my NHibernate Custom Membership and Role Providers - Manuel Abadia's ASP.NET stuff
 
# Friday, 01 August 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, 01 August 2008 12:10:15 (Romance Daylight Time, UTC+02:00)  #    Comments [2]   ASP.NET | NHibernate  | 
Copyright © 2017 Manuel Abadia. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.