Re: Changing domain user password
- From: "Joe Kaplan \(MVP - ADSI\)" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 21 Dec 2005 14:58:51 -0600
The crux of doing this in a web page is simply to create a DirectoryEntry
object that is bound to the user's object in AD and invoking the
ChangePassword ADSI method. Impersonation may or may not be needed as you
need to prompt for the old password anyway, so it doesn't really hurt to
simply use those credentials in your DirectoryEntry constructor.
The error you are getting sounds like it is unrelated to an
DirectoryServices programming stuff though. Are you sure ASP.NET is working
in general?
Note also that Ryan and I have book coming out that covers this stuff in
detail, but it won't be available for a few more months now.
Posting an example of the code you are using would be a great start.
Joe K.
"Harry Devine" <hdevine@xxxxxxxxxxxxxxxx> wrote in message
news:%23FysvCmBGHA.1008@xxxxxxxxxxxxxxxxxxxxxxx
> I've been searching around for an answer to this question, but haven't
> gotten too far. I'm fairly new to ASP.NET, so I'm not sure how to setup
> machine.config and web.config properly.
>
> What I want to be able to do is allow a domain user to change their
> password in the AD via a webpage. We have several users with domain
> accounts, but they do not actually login to our domain as they are spread
> out all over the country. I have a VBS script that notifies them when
> their password is due to expire, starting 10 days out.
>
> Since these users are not local to where my domain controller resides,
> they have to call me or email me to have their password reset. I found an
> example written by Ryan Dunn using an Impersonate function that he wrote
> (www.dunnry.com), but I keep getting an error stating: "Parser Error
> Message: The XML file
> c:\winnt\microsoft.net\framework\v1.1.4322\Config\machine.config could not
> be loaded. Either a required impersonation level was not provided, or the
> provided impersonation level is invalid. "
>
> This seems like, to me, a fundamental type of function to do, but info on
> how to do it is all over the place. Does anyone have any good ideas or
> steps on how to accomplish this?
>
> Thanks for any help,
> Harry
>
.
- Follow-Ups:
- Re: Changing domain user password
- From: Harry Devine
- Re: Changing domain user password
- References:
- Changing domain user password
- From: Harry Devine
- Changing domain user password
- Prev by Date: Re: What is the best approach?
- Next by Date: Re: What is the best approach?
- Previous by thread: Changing domain user password
- Next by thread: Re: Changing domain user password
- Index(es):