我有一个带有ASP登录身份验证的MS Visual Studio 2010 ASP.NET / SQL SERVER 2008应用程序,但是我没有登录名/密码登录,当我尝试在数据库中找到它时,我发现了一些vw_aspnet_Users
视图使用以下代码:
SELECT [ApplicationId]
,[UserId]
,[UserName]
,[LoweredUserName]
,[MobileAlias]
,[IsAnonymous]
,[LastActivityDate]
FROM [my_db].[dbo].[vw_aspnet_Users]
仍然,当我运行它时,当我可以选择散列通行证之类的东西时,我没有“密码”列!抱歉,我是ASP的新手,但是有一种方法可以对此进行有效的登录/传递,自昨天以来,我真的对此感到困惑!
这是登录页面的一些代码:
ASP:
<asp:Login ID="Login1" runat="server" class="centerBox" Style="width: 100%" OnAuthenticate="Login1_Authenticate"
OnLoggedIn="Login1_LoggedIn" OnLoggingIn="Login1_LoggingIn">
C#:
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
// Next, determine if the user's username/password are valid
if (Membership.ValidateUser(Login1.UserName, Login1.Password))
{
FormsAuthentication.SetAuthCookie(Login1.UserName, Login1.RememberMeSet);
e.Authenticated = true;
}
else
{
e.Authenticated = false;
Login1.FailureText = "Wrong Login/Password.";
}
}
谢谢。
您无法从数据库中获取密码。您可以找到散列,但可以将其散列以保护密码,因此,我不建议尝试对其进行解密。
您可以做什么:打开ASP.Net Configuration:菜单:Website,单击ASP.Net Configuration并重置密码或创建一个新用户。您也可以临时删除对Web.Config中目录的限制。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句