calling adsi from aspnet

R

Rich

We have an aspnet app that allows the user to change their password. We are
using windows authentication on win2003.

In the sample code below the first call to WriteInfo call properly echos the
logged in user.

The second call to WriteInfo (post ChangePassword) however lists the
identity as NT
AUTHORITY\NETWORK SERVICE.

How can we ensure that the identity is not switched during this call?

identity = WindowsIdentity.GetCurrent()

ApplicationLog.WriteInfo("identity before ChangePassword" & identity.Name)

entry.Invoke("ChangePassword", New Object() {oldPassword, newPassword})

identity = WindowsIdentity.GetCurrent()

ApplicationLog.WriteInfo("identity after ChangePassword" & identity.Name)



Thanks

Rich M.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,765
Messages
2,569,568
Members
45,042
Latest member
icassiem

Latest Threads

Top