ASP.NET - 登录控制在web.config文件证书 [英] ASP.NET - Login Control with Credentials in web.config file

查看:105
本文介绍了ASP.NET - 登录控制在web.config文件证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图掀起快速和肮脏的应用。此应用程序需要支持用户身份验证。要做到这一点,我以为我可以依靠内置的登录控制和利用,像这样在web.config的凭据能力:

I have been trying to whip up a quick and dirty application. This application needs to support user authentication. To accomplish this, I thought I could rely on the built in Login control and utilize the credentials ability of the web.config like so:

<authentication mode="Forms">
  <forms defaultUrl="/authenticated/menu.aspx" loginUrl="Default.aspx">
    <credentials passwordFormat="Clear">
      <user name="user1" password="p@ssw0rd" />  
    </credentials>
  </forms>
</authentication>

然而,似乎Login控件需要一个成员资格提供程序。我有以下两个问题:

However, it seems the Login control requires a Membership Provider. I have the following two questions:


  1. ,与web.config中工作的成员资格提供程序是否存在?如果是这样,在哪里?我一直没能找到一个?

  2. 是否可以登录到使用在web.config中的凭据的Web应用程序?

感谢您!

推荐答案

有没有内置的成员资格提供了的Web.config 。您可以使用手动验证凭据的<一个href=\"http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.authenticate.aspx\"相对=nofollow> FormsAuthentication.Authenticate 方法。

There's no built in membership provider for Web.config. You can manually validate the credentials using the FormsAuthentication.Authenticate method.

这篇关于ASP.NET - 登录控制在web.config文件证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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