做登录系统在ASP.NET网站管理工具中创建用户时遇到的有关问题(贴源码,求高手解答)
做登录系统在ASP.NET网站管理工具中创建用户时遇到的问题(贴源码,求高手解答)
遇到错误。请返回上一页并重试。
下面的消息可能会有助于诊断问题: 应用程序被配置为发出安全 Cookie。这些 Cookie 要求浏览器通过 SSL (https 协议)发出请求。但是,当前的请求没有通过 SSL 发送。 在 System.Web.Security.FormsAuthentication.SetAuthCookie(String userName, Boolean createPersistentCookie, String strCookiePath) 在 System.Web.Security.FormsAuthentication.SetAuthCookie(String userName, Boolean createPersistentCookie) 在 System.Web.UI.WebControls.CreateUserWizard.AttemptLogin() 在 System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() 在 System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) 在 System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) 在 System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) 在 System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) 在 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) 在 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) 在 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) 在 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
上面是ASP.NET网站管理工具中创建用户后报的错误,下面是我的web.config配置页面内容,请高手指出错误原因不胜感激!!!
<connectionStrings>
<add name="SqlConn" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|ASPNETDB.MDF;User Instance=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<!--
设置 compilation debug="true" 可将调试符号插入
已编译的页面中。但由于这会
影响性能,因此只在开发过程中将此值
设置为 true。
-->
<trace enabled="true" />
<authentication mode="Forms">
<forms timeout="30000"/>
</authentication>
<membership >
<providers>
<clear/>
<add connectionStringName="SqlConn" name="AspNetSqlMembershipProvider" requiresQuestionAndAnswer="false" enablePasswordRetrieval="false" passwordFormat="Clear" applicationName="/" requiresUniqueEmail="false" enablePasswordReset="true" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</membership>
<roleManager enabled="true" cacheRolesInCookie="true">
<providers>
<clear/>
<add connectionStringName="SqlConn"
applicationName="/" name="AspNetSqlRoleProvider"
type="System.Web.Security.SqlRoleProvider,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</roleManager>
<pages validateRequest="false" enableEventValidation="false" />
<httpRuntime maxRequestLength="2048" executionTimeout="60"/>
<sessionState mode="InProc" cookieless="AutoDetect" timeout="20" />
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
遇到错误。请返回上一页并重试。
下面的消息可能会有助于诊断问题: 应用程序被配置为发出安全 Cookie。这些 Cookie 要求浏览器通过 SSL (https 协议)发出请求。但是,当前的请求没有通过 SSL 发送。 在 System.Web.Security.FormsAuthentication.SetAuthCookie(String userName, Boolean createPersistentCookie, String strCookiePath) 在 System.Web.Security.FormsAuthentication.SetAuthCookie(String userName, Boolean createPersistentCookie) 在 System.Web.UI.WebControls.CreateUserWizard.AttemptLogin() 在 System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() 在 System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) 在 System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) 在 System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) 在 System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) 在 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) 在 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) 在 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) 在 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
上面是ASP.NET网站管理工具中创建用户后报的错误,下面是我的web.config配置页面内容,请高手指出错误原因不胜感激!!!
<connectionStrings>
<add name="SqlConn" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|ASPNETDB.MDF;User Instance=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<!--
设置 compilation debug="true" 可将调试符号插入
已编译的页面中。但由于这会
影响性能,因此只在开发过程中将此值
设置为 true。
-->
<trace enabled="true" />
<authentication mode="Forms">
<forms timeout="30000"/>
</authentication>
<membership >
<providers>
<clear/>
<add connectionStringName="SqlConn" name="AspNetSqlMembershipProvider" requiresQuestionAndAnswer="false" enablePasswordRetrieval="false" passwordFormat="Clear" applicationName="/" requiresUniqueEmail="false" enablePasswordReset="true" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</membership>
<roleManager enabled="true" cacheRolesInCookie="true">
<providers>
<clear/>
<add connectionStringName="SqlConn"
applicationName="/" name="AspNetSqlRoleProvider"
type="System.Web.Security.SqlRoleProvider,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</roleManager>
<pages validateRequest="false" enableEventValidation="false" />
<httpRuntime maxRequestLength="2048" executionTimeout="60"/>
<sessionState mode="InProc" cookieless="AutoDetect" timeout="20" />
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>