myformauthentication从哪里获取数据? [英] Where myformauthentication gets the data from?

查看:68
本文介绍了myformauthentication从哪里获取数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的前任项目在登录时遇到了一些问题。

现在我必须知道,如果有一个新的登录应用程序会发生什么。

但是我真的不明白,在使用FormAuthentication登录时会发生什么。

使用的代码是:

Hi, there are some problems with the project of my predecessor on the login.
Now I have to found out, what happens if some one new logs in at the application.
But I don't really understand, what happens during the login with FormAuthentication.
The used code is:

FormsAuthentication.SetAuthCookie(userName, false);
                Response.Redirect(returnURL);





但是从哪里获取数据?





But wherefrom it takes the data?

<authentication mode="Windows">
    </authentication>
    <authorization>
      <allow users="?" />
    </authorization>
    <profile defaultProvider="DefaultProfileProvider">
      <providers>
        <add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=...." connectionStringName="DefaultConnection" applicationName="/" />
      </providers>
    </profile>
    <membership defaultProvider="DefaultMembershipProvider">
      <providers>
        <add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=...." connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
      </providers>
    </membership>





我尝试过:



我想在web.config文件中找到解决方案,大多数论坛帖子建议在部件会员资格中查看,但它只是说默认。



如果有人可以帮助我,我会很高兴!



What I have tried:

I thought about finding the solution in the web.config file and most forum post recommend to look there in the part membership, but it just says default.

I would be glad if someone could help me!

推荐答案

您显示的代码部分不会访问任何数据。它没有做任何事情来验证用户。它只是假设您已经验证了用户,并设置了一个身份验证cookie,表示该用户已使用指定的帐户登录。



应该有代码在您显示的行之前验证用户的凭据。您需要查看该代码以查看凭据的存储位置。
The section of code you've shown doesn't access any data. It doesn't do anything to validate the user. It simply assumes that you've already validated the user, and sets an authentication cookie to say that the user is signed in with the specified account.

There should be code prior to the lines you've shown which validates the user's credentials. You'll need to look at that code to see where the credentials are stored.


这篇关于myformauthentication从哪里获取数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆