Author: TheEagle | Posted on: 10/8/2008 11:12:30 AM | Views : 493

Hi,

I have stopped in a project because of Exceptions I didn't see before.

When I try to add a new user(as registeration using CreateUserWizard) I got the error

The parameter 'username' must not be empty.
Parameter name: username

 

When I want to delete a user I got the exception:

Item has already been added. Key in dictionary: 'UserName'  Key being added: 'UserName'


Which occur in  the code:
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
Line 38:     {
Line 39:         Roles.AddUserToRole(createUser1.UserName,"User");
Line 40:     }

The HTML code of the Adding new user is as following:

<div id="NewUser">
<asp:CreateUserWizard ID="createUser1" runat="server" Aut ...

Go to the complete details ...