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  | 
Monday, 18 August 2008 15:11:49 (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...
cowgaR
Tuesday, 19 August 2008 10:45:07 (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.
All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

[Captcha]Enter the code shown (prevents robots):

Live Comment Preview
Copyright © 2017 Manuel Abadia. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.