DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Tue, 07 Aug 2007 14:36:25 -0700,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Homer
          2    Mark Fitzpatrick
          3    Homer


How to reset user's password without having to use PasswordRecovery   
Hi,

I want to be able to reset a user's password and I do not want to use
the PasswordRecovery control to reset and email it to the user.  A
while back, I thought I'd read an article that mentioned about
resetting password using the Website Administration Tool.  I could not
find such option in WSAT.  Please help!

Thanks,
Jon
Date:Tue, 07 Aug 2007 14:36:25 -0700   Author:  

Re: How to reset user's password without having to use PasswordRecovery   
The MembershipUser object has a ChangePassword method. It also has a 
ResetPassword method, but the ResetPassword will generate one randomly. What 
you can do though is obtain an instance of the user via their username

MembershipUser user = System.Web.Security.Membership.GetUser(username);


To change the password you need to know the old password, though if you call 
resetpassword it will return the newly reset password string so you can do:

user.ChangePassword(user.ResetPassword(),"mynewpassword);

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"Homer"  wrote in message 
news:1186522585.712374.183340@g12g2000prg.googlegroups.com...

> Hi,
>
> I want to be able to reset a user's password and I do not want to use
> the PasswordRecovery control to reset and email it to the user.  A
> while back, I thought I'd read an article that mentioned about
> resetting password using the Website Administration Tool.  I could not
> find such option in WSAT.  Please help!
>
> Thanks,
> Jon
> 
Date:Tue, 7 Aug 2007 18:20:55 -0500   Author:  

Re: How to reset user's password without having to use PasswordRecovery   
On Aug 7, 4:20 pm, "Mark Fitzpatrick"  wrote:

> The MembershipUser object has a ChangePassword method. It also has a
> ResetPassword method, but the ResetPassword will generate one randomly. What
> you can do though is obtain an instance of the user via their username
>
> MembershipUser user = System.Web.Security.Membership.GetUser(username);
>
> To change the password you need to know the old password, though if you call
> resetpassword it will return the newly reset password string so you can do:
>
> user.ChangePassword(user.ResetPassword(),"mynewpassword);
>
> Hope this helps,
> Mark Fitzpatrick
> Microsoft MVP - FrontPage
>
> "Homer"  wrote in message
>
> news:1186522585.712374.183340@g12g2000prg.googlegroups.com...
>
>
>
> > Hi,
>
> > I want to be able to reset a user's password and I do not want to use
> > the PasswordRecovery control to reset and email it to the user.  A
> > while back, I thought I'd read an article that mentioned about
> > resetting password using the Website Administration Tool.  I could not
> > find such option in WSAT.  Please help!
>
> > Thanks,
> > Jon- Hide quoted text -
>
> - Show quoted text -


Thank you Mark.  I'll implement your suggestion now.
Date:Wed, 08 Aug 2007 07:30:57 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us