Share via


authentication 的 credentials 的 clear 元素(ASP.NET 设置架构)

移除对继承的连接字符串的所有引用,只允许由当前 user 元素添加的引用。

警告说明警告

这种存储凭据的方法只适用于不需要高级别安全性的应用程序。

<clear />

特性和元素

以下几节描述了属性、子元素和父元素。

特性

无。

子元素

无。

父元素

元素

说明

configuration

公共语言运行时和 .NET Framework 应用程序所使用的每个配置文件中均需要的根元素。

system.web

指定配置文件中 ASP.NET 配置设置的根元素。 包含各种配置元素,这些配置元素配置 ASP.NET Web 应用程序并控制这些应用程序的行为方式。

authentication

配置 ASP.NET 身份验证方案,该方案用于识别查看 ASP.NET 应用程序的用户。

forms

为基于窗体的自定义身份验证配置 ASP.NET 应用程序。

credentials

允许选择性地在配置文件中定义名称和密码凭据。

备注

clear 元素移除对继承的连接字符串的所有引用,只允许由当前 user 元素添加的引用。

示例

下面的示例将设置密码格式,清除所有继承的凭据,并提供用户名和密码。

<authentication mode="Windows">
   <credentials passwordFormat="SHA1">
      <clear />
      <user name="UserName" 
            password="07B7F3EE06F278DB966BE960E7CBBD103DF30CA6"/>
   </credentials>
</authentication>

元素信息

配置节处理程序

AuthenticationSection

配置成员

Credentials

Clear

可配置的位置

Machine.config

根级别的 Web.config

应用程序级别的 Web.config

要求

IIS 5.0、IIS 5.1 或 IIS 6.0

.NET Framework 1.x、2.0

Visual Studio 2003 或 Visual Studio 2005

请参见

任务

如何:使用位置设置配置特定目录

如何:锁定 ASP.NET 配置设置

参考

authentication 的 forms 元素(ASP.NET 设置架构)

authentication 的 credentials 的 user 元素(ASP.NET 设置架构)

authentication 的 credentials 的 remove 元素(ASP.NET 设置架构)

authentication 元素(ASP.NET 设置架构)

authentication 的 forms 的 credentials 元素(ASP.NET 设置架构)

system.web 元素(ASP.NET 设置架构)

authentication 的 passport 元素(ASP.NET 设置架构)

configuration 元素(常规设置架构)

System.Configuration

System.Web.Configuration

AuthenticationSection

Credentials

Clear

概念

ASP.NET 配置文件层次结构和继承

保证 ASP.NET 配置的安全

ASP.NET 配置方案

其他资源

ASP.NET 身份验证

XML Web Services Created Using ASP.NET and XML Web Service Clients

常规配置设置 (ASP.NET)

ASP.NET 配置设置

ASP.NET 网站管理

ASP.NET 配置文件

ASP.NET 配置 API