One or more input parameters are invalid

Posted on 2011-05-02
Last Modified: 2012-05-11
I have a small app that I created to allow me to reset active directory passwords. I functions perfectly under IIS7, but when I deploy the app to IIS6 I'm having issues.

When I try to reset a password, I get an error "One or more input parameters are invalid"

I have hard coded the username and password in hopes this would help solve the problem, but I'm still getting the error. Any help would be greatly appreciated.

This is the example that I have been following to create the app

Active Directory Account Management


ADMethodsAccountManagement ADMethods = new ADMethodsAccountManagement();

        public string SetSecurePassword()
            RandomPassword rp = new RandomPassword();
            return RandomPassword.Generate(8, 10);

        protected void Button1_Click(object sender, EventArgs e)
         //string sPwd = SetSecurePassword();
            string sPwd = "Password123!";
         UserPrincipal myUser = ADMethods.GetUser("Test1");
         myUser.GivenName = "Given Name";
         myUser.Surname = "Surname";
         myUser.MiddleName = "Middle Name";
         myUser.EmailAddress = "";
         myUser.EmployeeId = "Employee ID";
         lblStatus.Text = "Success";
         lblPassword.Text = sPwd.ToString();

Open in new window

[COMException (0x80005008): One or more input parameters are invalid

[PrincipalOperationException: One or more input parameters are invalid
   System.DirectoryServices.AccountManagement.SDSUtils.SetPassword(DirectoryEntry de, String newPassword) +284
   System.DirectoryServices.AccountManagement.ADStoreCtx.SetPassword(AuthenticablePrincipal p, String newPassword) +76
   System.DirectoryServices.AccountManagement.PasswordInfo.SetPassword(String newPassword) +56
   System.DirectoryServices.AccountManagement.AuthenticablePrincipal.SetPassword(String newPassword) +21
   Email_User.WebForm2.Button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\testpasswordreset\testpasswordreset\WebForm2.aspx.cs:35
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

Open in new window

Question by:brendanlefavre
    LVL 10

    Accepted Solution

    I'm afraid it has nothing to do with the IE version you're working on.
    Everything is Server-Side code so the server is processig the handles.

    When you deploy upon a IIS6 machine can you give me the .Net versions installed upon that machine?
    And if possible also those the IIS7:
    While retreiving those check if .Net 3.5 is installed upon the IIS6 machine (You're coding under 3.5)

    poor beggar
    LVL 1

    Expert Comment


    If your using store procedure for saving data or any other way.
    then check each parameter type is same to value which you are passing.
    or number of parameters are same.

    Author Closing Comment

    The issue was related to how I was interacting with Active Directory, and the version of IIS. One of my methods needed to be adjusted to working correctly with IIS 6, but when using IIS 7, it functioned correctly

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now