Setting ASP.Net Permissions - Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
问题 I have an MVC 4 application that allows a user to change their Active Directory password through a password reset functionality page. I have the following piece of code that sets the new password: DirectoryEntry de = sr.GetDirectoryEntry(); de.Invoke("SetPassword", new object[] { newPassword }); de.Properties["LockOutTime"].Value = 0; Upon trying to submit the form with the new password details I am having the following error written to the application event log: 0x80070005 (E_ACCESSDENIED))