CreateUserWizard: CreateUserWizardStep.ContentTemplate 未包含用于安全提示问题的 ID 为 Question 的 IEditableTextControl。当成员资
“/NewsSearch/WebSite”应用程序中的服务器错误。--------------------------------------------------------------------------------
CreateUserWizard: CreateUserWizardStep.ContentTemplate 未包含用于安全提示问题的 ID 为 Question 的 IEditableTextControl。当成员资格提供程序要求提示问题和答案时,必须提供此项。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Web.HttpException: CreateUserWizard: CreateUserWizardStep.ContentTemplate 未包含用于安全提示问题的 ID 为 Question 的 IEditableTextControl。当成员资格提供程序要求提示问题和答案时,必须提供此项。
源错误:
执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。
堆栈跟踪:
[HttpException (0x80004005): CreateUserWizard: CreateUserWizardStep.ContentTemplate 未包含用于安全提示问题的 ID 为 Question 的 IEditableTextControl。当成员资格提供程序要求提示问题和答案时,必须提供此项。]
System.Web.UI.WebControls.CreateUserStepContainer.get_QuestionTextBox() +1592820
System.Web.UI.WebControls.CreateUserWizard.CreateControlHierarchy() +191
System.Web.UI.WebControls.Wizard.CreateChildControls() +126
System.Web.UI.WebControls.CreateUserWizard.CreateChildControls() +23
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.WebControls.Wizard.OnInit(EventArgs e) +100
System.Web.UI.Control.InitRecursive(Control namingContainer) +321
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +692
--------------------编程问答-------------------- codeside:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewsUser.aspx.cs" MasterPageFile="~/MasterPage.master" Inherits="NewsSearch.Web.NewsUser" %>
<asp:Content ID="cntpage" runat="server" ContentPlaceHolderID="cphPage" EnableViewState="false">
<div class="signinposition" >
<asp:CreateUserWizard runat="server" ID="CreateUserWizard" InvalidAnswerErrorMessage="please your pwd" CreateUserButtonText="sign up" RequireEmail="false" SkinID="NewUser" PasswordRegularExpressionErrorMessage="Please enter a more secure password.">
<WizardSteps>
<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server" EnableViewState="false">
<ContentTemplate>
<asp:Panel ID="panFacus" runat="server" Width="700">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td style="width: 66px; height: 57px;" colspan="2">
Younewaccount</td></tr>
<tr><td style="height: 41px; width: 112px;"> <label for="UserName">
User Name:</label></td><td style="height: 41px">
<asp:TextBox ID="UserName" runat="server" CssClass="signinTextbox" Width="155px"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="CreateUserWizard" Width="130px">*</asp:RequiredFieldValidator></td></tr>
<tr><td style="width: 112px"><label for="Password">Password:</label></td><td><asp:TextBox ID="pwd" runat="server" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="passwordRequare" runat="server" ControlToValidate="Password" ErrorMessage="password is requared" ValidationGroup="CreateUserWizard">*</asp:RequiredFieldValidator></td></tr>
<tr><td style="width: 112px"><label for="ConfirmPassword">
ConfirmPassword:</label></td><td><asp:TextBox ID="ComfirePassword" runat="server" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="ConfirmPasswordrequire" runat="server" ControlToValidate="ConfirmPassword" ErrorMessage="confirm password is requared" ValidationGroup="CreateUserWizard" Display="Dynamic">*</asp:RequiredFieldValidator></td></tr>
<tr><td style="width: 64px; height: 19px;" colspan="2">
<asp:CompareValidator ID="PasswordConfirm" runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPasswowrd"
Display="Dynamic" ErrorMessage="password must remain match here" ValidationGroup="CreateUserWizard" Width="225px"></asp:CompareValidator>
</td></tr>
<tr><td style="width: 66px" colspan="2"> <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False" /></td></tr>
<tr><td style="width: 66px" colspan="2"><asp:Button ID="StepNextButton" runat="server" CommandName="MoveNext" CssClass="signinButton"
Text="Sign Up" ValidationGroup="CreateUserWizard" /></td></tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:CreateUserWizardStep>
<asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server" >
<ContentTemplate>
<p class="signinLabel">
<br />
<b>Thank you for signing up.</b></p>
<p class="signinLabel">
Your account has been created. Now you can:</p>
</p>
<p class="signinLabel">
<a class="signinNewUser" href="Default.aspx">Continue</a>
</p>
<p class="signinLabel">
<a class="signinNewUser" href="CheckOut.aspx">Check out</a>
</p>
<p class="signinLabel">
<a class="signinNewUser" href="UserProfile.aspx">Update your profile</a>
</p>
<p>
</p>
</ContentTemplate>
</asp:CompleteWizardStep>
</WizardSteps>
</asp:CreateUserWizard>
</div>
</asp:Content>
--------------------编程问答-------------------- up --------------------编程问答-------------------- 请在配置文件中配置membership,参考如:
<system.web>
<membership defaultProvider="SQLMembershipProvider">
<providers>
<add name="SQLMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SQLConnString1"
applicationName="MyQuestionTest" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false"
requiresUniqueEmail="false" passwordFormat="Hashed"/>
</providers>
</membership>
</system.web>
补充:.NET技术 , C#