473,320 Members | 2,073 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

ActiveDirectoryMembershipProvider CreateUserWizard

I'm trying to setup a web site that uses active directory for user
authentication under asp.net 2.0.

For testing, I have separately installed two virtual servers. The first is
a domain controller in a new forest named VSERVER00 running Windows Server
2003 R2 Standard. The second is an application server running IIS in the
same domain, named VSERVER01 also running Windows Server 2003 R2 Standard.
The domain is VDOMAIN.local.

I have created an OU called Test in Active Directory on VSERVER00 and used
the Delegation of Control Wizard to grand all permissions to the
Administrator account. To keep this simple, the administrator is
administrator with the password password. I've created one user in the OU
manually through the GUI.

The IIS server Web.config page is configured as shown below.

----------
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>
<add name="vDomainActiveDirectory"
connectionString="LDAP://VSERVER00/OU=Test,DC=VDOMAIN,DC=local" />
</connectionStrings>
<system.web>
<customErrors mode="Off" />
<authentication mode="Forms" />
<authorization>
<allow roles="admin" />
</authorization>
<membership defaultProvider="AspNetActiveDirectoryMembershipPr ovider">
<providers>
<add name="AspNetActiveDirectoryMembershipProvider"
connectionStringName="vDomainActiveDirectory"
applicationName="/"
maxInvalidPasswordAttempts="5"
passwordAttemptWindow="8"
attributeMapUsername="sAMAccountName"

connectionProtection="None"
connectionUsername="vDOMAIN\Administrator"
connectionPassword="password"

minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0"

enablePasswordReset="false"
enableSearchMethods="true"

requiresQuestionAndAnswer="false"
requiresUniqueEmail="false"

type="System.Web.Security.ActiveDirectoryMembershi pProvider,
System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
/>
</providers>
</membership>
<roleManager enabled="false" />
</system.web>
</configuration>
----------

Then I created a virtual folder on the application server named
TestCreateUser. On my computer, I created a very simple web application
using Visual Studio 2005 using the CreateUserWizard control and copied it to
the virtual folder.

In the web application, I have not written any custom code, only configured
the control (completely in the ascx file). Below is the ASCX file.

----------
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>New User Creation - test page</title>
</head>
<body>
<form id="frmNewUser" runat="server">
<div>
<asp:CreateUserWizard ID=wizNewUser runat="server">
<WizardSteps>
<asp:CreateUserWizardStep runat="server">
</asp:CreateUserWizardStep>
<asp:CompleteWizardStep runat="server">
</asp:CompleteWizardStep>
</WizardSteps>
</asp:CreateUserWizard>
</div>
</form>
</body>
</html>
----------

The first time into the page, I can create a new user without any problems.
All subsequent attempts at creating a new user fail with the following error.

----------
Server Error in '/TestCreateUser' Application.

--------------------------------------------------------------------------------

One or more input parameters are invalid

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: One or more
input parameters are invalid

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:

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

[TargetInvocationException: Exception has been thrown by the target of an
invocation.]
System.DirectoryServices.DirectoryEntry.Invoke(Str ing methodName,
Object[] args) +221
System.Web.Security.ActiveDirectoryMembershipProvi der.CreateUser(String
username, String password, String email, String passwordQuestion, String
passwordAnswer, Boolean isApproved, Object providerUserKey,
MembershipCreateStatus& status) +2461
System.Web.UI.WebControls.CreateUserWizard.Attempt CreateUser() +305

System.Web.UI.WebControls.CreateUserWizard.OnNextB uttonClick(WizardNavigationEventArgs e) +105
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Obj ect source, EventArgs
e) +453
System.Web.UI.WebControls.CreateUserWizard.OnBubbl eEvent(Object source,
EventArgs e) +149
System.Web.UI.WebControls.WizardChildTable.OnBubbl eEvent(Object source,
EventArgs args) +17
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument)
+163

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
--------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.42
----------

If I reset IIS, I am able to create another user, then as before, all
subsequent submissions fail with the same error.

What am I missing? -- Help

Jul 5 '06 #1
0 1602

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rik Brooks | last post by:
I am trying to write a change password routine using the new ActiveDirectoryMembershipProvider. My code is below. I'm getting an exception saying that my ActiveDirectoryMembershipProvider has not...
2
by: Learner | last post by:
Hello, I have defined another textbox control in the CreateUserWizard control and this is how I am trying to get the value of it in the code behind page is below im myStep As...
2
by: JD Qixcle | last post by:
I have been following several threads between David Thielen and Luke Zhang regarding the ActiveDirectoryMembershipProvider as used for ASP.NET 2.0 Forms authentication, but I receive a slighly...
0
by: Parag Mahajan | last post by:
Hi, I am using the membership provider class, "System.Web.Security.ActiveDirectoryMembershipProvider". I am using Login Server control and attaching the already configured...
18
by: Glenn Eastlack | last post by:
I have been trying to use ASP.NET 2.0 built-in Membership Providers. Particularly the ActiveDirectoryMembershipProvider. My web.config looks like this: <connectionStrings> <clear/> <add ...
0
by: Avi | last post by:
A CreateUserWizard contorl receives new user details, adds the user to the database, tries to send a confirmation mail message and stops with a "System.FormatException: The specified string is not...
0
by: zeplynne | last post by:
Having trouble using ActiveDirectoryMembershipProvider with one specific website. When attempting to login to the site, after a long period of time (about 2 - 3 minutes), "Server Application...
3
by: rroden | last post by:
C:\WINDOWS\assembly \WindowsSystem.Web.Security.ActiveDirectoryMembershipProvider isn't being installed with .net 2.0 or 3.0 on any of my systems. What am I doing wrong?
4
by: Max2006 | last post by:
Hi, I am using ActiveDirectoryMembershipProvider for authentication. In my development environment I don't have any Active Directory available for development and test. Basically my development...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.