Tuesday, August 15, 2006

 

C# Random Password Generator

Scary spiderI needed to generate random passwords for new user accounts in Community Server 2.0. I tried using the included User.Member.ResetPassword() function, but the password was too long:

uhb]6h=^mQ-OS

Oooooh...scary...

So I did a quick search on google for "C# random password" and at the top of the list was this excellent, flexible class that worked as advertised.

Now my passwords look like this:

9i?FY-2p

Thank you Obviex.

Now, if only Community Server allowed you to force password change on the user's next login. Good excuse to write a custom module, I suppose.

Comments: Post a Comment

Links to this post:

Create a Link



<< Home
Content copyright ©2003-2006 Tod Birdsall