Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

One or more input parameters are invalid

Posted on 2011-05-02
3
Medium Priority
?
2,161 Views
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

Cheers,
Brendan


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 = "test1@test.com";
         myUser.EmployeeId = "Employee ID";
         myUser.SetPassword(sPwd);
         myUser.Save();
         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

0
Comment
Question by:brendanlefavre
3 Comments
 
LVL 10

Accepted Solution

by:
John Claes earned 1500 total points
ID: 35510917
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
0
 
LVL 1

Expert Comment

by:nidheeshmca
ID: 35512506

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.
0
 

Author Closing Comment

by:brendanlefavre
ID: 35903007
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
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Integration Management Part 2
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…

564 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