I cannot create a user account on the registration page anymore!
I also cannot change the Admin password. Anything to do with creating a password, I keep getting the pop up box (an internet explorer window) that tells me 5 characters are required.
And just so you know I'm not nuts, I've tried: "Cat5!" ; "Catmm5$" ; "Bunny12$" ; and many many others, all clearly with the required characters! No matter what I try, as soon as I go to move to the second box where you re type that password, the red * immediately
appears next to the first box and I know its not going to let me create it.
I don't think this has anything to do with the Membership Provider. The fact that you're getting the red * from the client-side indicates this is an issue with the RegularExpressionValidator for the Password field in the page.
ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valPasswordLength" runat="server" ControlToValidate="Password" SetFocusOnError="true" Display="Dynamic" ValidationExpression="\w{5,}" ErrorMessage="Password must be at least 5 characters long."
ToolTip="Password must be at least 5 characters long."
ValidationGroup="CreateUserWizard1">*</asp:RegularExpressionValidator>
At that part, I changed it to say "Password must be at least 15 characters long" and it did say that. Could this be a problem coming from the windows Net folder like that other poster was talking about at:
http://forums.asp.net/t/937000.aspx ? I just don't understand why I would be the only one having this problem. Everyone is downloading the same code. And it used to work for me too. Its like something got messed
up somewhere else. I even uninstalled and then reinstalled VS 2008. (I was going to do that anyway because I was using the 90 trial and now I have the paid software)
The other post talks about what happens when you don't include a membership provider in web.config, so I don't think that's it.
Try this as an experiment -- comment out the RegularExpressionValidator completely, by surrounding it with comment tags:
<%--
<asp:RegularExpressionValidator ID="valPasswordLength" runat="server" ControlToValidate="Password" SetFocusOnError="true" Display="Dynamic"
ValidationExpression="\w{5,}" ErrorMessage="Password must be at least 5 characters long." ToolTip="Password must be at least 5 characters long."
ValidationGroup="CreateUserWizard1">*</asp:RegularExpressionValidator>
--%>
Then see what happens. If it works with the validator commented out, then you know for sure that it's the validator, which I am already 99% sure that it is.
RaeKC
Member
101 Points
366 Posts
Can't create passwords
Dec 11, 2008 01:38 AM|LINK
I cannot create a user account on the registration page anymore!
I also cannot change the Admin password. Anything to do with creating a password, I keep getting the pop up box (an internet explorer window) that tells me 5 characters are required.
And just so you know I'm not nuts, I've tried: "Cat5!" ; "Catmm5$" ; "Bunny12$" ; and many many others, all clearly with the required characters! No matter what I try, as soon as I go to move to the second box where you re type that password, the red * immediately appears next to the first box and I know its not going to let me create it.
Has anyone else had this happen?
Rae
beerhouse machine.config web.config passwords
Neolsoft
Member
702 Points
116 Posts
Re: Can't create passwords
Dec 11, 2008 03:48 AM|LINK
Hi,
Are you using any membership provider?
Try the password conditions specified in it.
<membership>
<providers>
<clear />
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LocalSqlServer"
minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="1"
enablePasswordRetrieval="true"
enablePasswordReset="false"
passwordFormat="Encrypted"
requiresQuestionAndAnswer="true"
requiresUniqueEmail="true"
</providers>
</membership>
Neolsoft
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark as Answer if it helps you
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RaeKC
Member
101 Points
366 Posts
Re: Can't create passwords
Dec 11, 2008 05:10 AM|LINK
Yes. This is part of the web.config file from the beerhouse project:
<membership defaultProvider="TBH_MembershipProvider" userIsOnlineTimeWindow="15">
<providers>
<add name="TBH_MembershipProvider" connectionStringName="LocalSqlServer" applicationName="/" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="true" passwordFormat="Encrypted" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</membership>
I'm using 5 alphanumeric digits. I'm doing that part correct.
Rae
Lee Dumond
Contributor
6404 Points
1173 Posts
Re: Can't create passwords
Dec 11, 2008 02:11 PM|LINK
I don't think this has anything to do with the Membership Provider. The fact that you're getting the red * from the client-side indicates this is an issue with the RegularExpressionValidator for the Password field in the page.
Could you post the page code and let us see that?
Follow Me on Twitter
RaeKC
Member
101 Points
366 Posts
Re: Can't create passwords
Dec 11, 2008 02:50 PM|LINK
I was looking at this: http://forums.asp.net/t/937000.aspx
but I wasn't sure if this applied to my problem.
I'm not sure if this is what you wanted. This is from the Registration.aspx page:
<%@ Page Language="C#" MasterPageFile="~/Template.master" AutoEventWireup="true"
CodeFile="Register.aspx.cs" Inherits="MB.TheBeerHouse.UI.Register" Title="The Beer House - Register" %>
<%@ Register src="Controls/UserProfile.ascx" TagName="UserProfile" TagPrefix="mb" %>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="Server">
<asp:CreateUserWizard runat="server" ID="CreateUserWizard1" AutoGeneratePassword="False"
ContinueDestinationPageUrl="~/Default.aspx" FinishDestinationPageUrl="~/Default.aspx" OnFinishButtonClick="CreateUserWizard1_FinishButtonClick" OnCreatedUser="CreateUserWizard1_CreatedUser">
<WizardSteps>
<asp:CreateUserWizardStep runat="server">
<ContentTemplate>
<div class="sectiontitle">Create your new account</div>
<p></p>
<table cellpadding="2">
<tr>
<td style="width: 110px;" class="fieldname"><asp:Label runat="server" ID="lblUserName" AssociatedControlID="UserName" Text="Username:" /></td>
<td style="width: 300px;"><asp:TextBox runat="server" ID="UserName" Width="100%" /></td>
<td>
<asp:RequiredFieldValidator ID="valRequireUserName" runat="server" ControlToValidate="UserName" SetFocusOnError="true" Display="Dynamic"
ErrorMessage="Username is required." ToolTip="Username is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="fieldname"><asp:Label runat="server" ID="lblPassword" AssociatedControlID="Password" Text="Password:" /></td>
<td><asp:TextBox runat="server" ID="Password" TextMode="Password" Width="100%" /></td>
<td>
<asp:RequiredFieldValidator ID="valRequirePassword" runat="server" ControlToValidate="Password" SetFocusOnError="true" Display="Dynamic"
ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valPasswordLength" runat="server" ControlToValidate="Password" SetFocusOnError="true" Display="Dynamic"
ValidationExpression="\w{5,}" ErrorMessage="Password must be at least 5 characters long." ToolTip="Password must be at least 5 characters long."
ValidationGroup="CreateUserWizard1">*</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="fieldname"><asp:Label runat="server" ID="lblConfirmPassword" AssociatedControlID="ConfirmPassword" Text="Confirm password:" /></td>
<td><asp:TextBox runat="server" ID="ConfirmPassword" TextMode="Password" Width="100%" /></td>
<td>
<asp:RequiredFieldValidator ID="valRequireConfirmPassword" runat="server" ControlToValidate="ConfirmPassword" SetFocusOnError="true" Display="Dynamic"
ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required."
ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
<asp:CompareValidator ID="valComparePasswords" runat="server" ControlToCompare="Password" SetFocusOnError="true"
ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
ValidationGroup="CreateUserWizard1">*</asp:CompareValidator>
</td>
</tr>
<tr>
<td class="fieldname"><asp:Label runat="server" ID="lblEmail" AssociatedControlID="Email" Text="E-mail:" /></td>
<td><asp:TextBox runat="server" ID="Email" Width="100%" Text='<%# Email %>' /></td>
<td>
<asp:RequiredFieldValidator ID="valRequireEmail" runat="server" ControlToValidate="Email" SetFocusOnError="true" Display="Dynamic"
ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator runat="server" ID="valEmailPattern" Display="Dynamic" SetFocusOnError="true" ValidationGroup="CreateUserWizard1"
ControlToValidate="Email" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ErrorMessage="The e-mail address you specified is not well-formed.">*</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="fieldname"><asp:Label runat="server" ID="lblQuestion" AssociatedControlID="Question" Text="Security question:" /></td>
<td><asp:TextBox runat="server" ID="Question" Width="100%" /></td>
<td>
<asp:RequiredFieldValidator ID="valRequireQuestion" runat="server" ControlToValidate="Question" SetFocusOnError="true" Display="Dynamic"
ErrorMessage="Security question is required." ToolTip="Security question is required."
ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="fieldname"><asp:Label runat="server" ID="lblAnswer" AssociatedControlID="Answer" Text="Security answer:" /></td>
<td><asp:TextBox runat="server" ID="Answer" Width="100%" /></td>
<td>
<asp:RequiredFieldValidator ID="valRequireAnswer" runat="server" ControlToValidate="Answer" SetFocusOnError="true" Display="Dynamic"
ErrorMessage="Security answer is required." ToolTip="Security answer is required."
ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td colspan="3" style="text-align: right;">
<asp:Label ID="ErrorMessage" SkinID="FeedbackKO" runat="server" EnableViewState="False"></asp:Label>
</td>
</tr>
</table>
<asp:ValidationSummary ValidationGroup="CreateUserWizard1" ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" />
</ContentTemplate>
</asp:CreateUserWizardStep>
<asp:WizardStep runat="server" Title="Set preferences">
<div class="sectiontitle">Set-up your profile</div>
<p></p>
All settings in this section are optional. The address information is required only if
you want to order products from our e-store. However, we ask you to fill in these details in all cases, because they
help us know our target audience, and improve the site and its contents accordingly.
Thank you for your cooperation!
<p></p>
<mb:UserProfile ID="UserProfile1" runat="server" />
</asp:WizardStep>
<asp:CompleteWizardStep runat="server"></asp:CompleteWizardStep>
</WizardSteps>
<%--<MailDefinition
BodyFileName="~/RegistrationMail.txt"
From="webmaster@effectivedotnet.com"
Subject="The Beer House: your new account">
</MailDefinition>--%>
</asp:CreateUserWizard>
</asp:Content>
RaeKC
Member
101 Points
366 Posts
Re: Can't create passwords
Dec 11, 2008 03:06 PM|LINK
At that part, I changed it to say "Password must be at least 15 characters long" and it did say that. Could this be a problem coming from the windows Net folder like that other poster was talking about at: http://forums.asp.net/t/937000.aspx ? I just don't understand why I would be the only one having this problem. Everyone is downloading the same code. And it used to work for me too. Its like something got messed up somewhere else. I even uninstalled and then reinstalled VS 2008. (I was going to do that anyway because I was using the 90 trial and now I have the paid software)
Lee Dumond
Contributor
6404 Points
1173 Posts
Re: Can't create passwords
Dec 11, 2008 03:17 PM|LINK
The other post talks about what happens when you don't include a membership provider in web.config, so I don't think that's it.
Try this as an experiment -- comment out the RegularExpressionValidator completely, by surrounding it with comment tags:
<asp:RegularExpressionValidator ID="valPasswordLength" runat="server" ControlToValidate="Password" SetFocusOnError="true" Display="Dynamic" ValidationExpression="\w{5,}" ErrorMessage="Password must be at least 5 characters long." ToolTip="Password must be at least 5 characters long." ValidationGroup="CreateUserWizard1">*</asp:RegularExpressionValidator>--%>Then see what happens. If it works with the validator commented out, then you know for sure that it's the validator, which I am already 99% sure that it is.
Follow Me on Twitter
RaeKC
Member
101 Points
366 Posts
Re: Can't create passwords
Dec 11, 2008 04:03 PM|LINK
THat did it! Now it lets me create the password.
Rae
edit:
But is there a way to fix it so I can use that control?
Lee Dumond
Contributor
6404 Points
1173 Posts
Re: Can't create passwords
Dec 11, 2008 05:21 PM|LINK
Quite frankly, I don't see anything wrong with the validator. There is no reason why it should not be working.
Try this: uncomment the validator back, but set EnableClientScript="false" on it this time.
Try it with both valid and invalid data. If it works, we know that the validation is failing on the client side only. That should narrow it down some.
Follow Me on Twitter
RaeKC
Member
101 Points
366 Posts
Re: Can't create passwords
Dec 11, 2008 05:52 PM|LINK
Where is "EnableClientScript= "
I can't find that line anywhere?
Rae