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

指定要重定向到的页(如果该页要求身份验证,而用户尚未通过 Microsoft Passport 身份验证注册)。

<passport 
   redirectUrl="redirectURL"
/>

特性和元素

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

特性

特性

说明

redirectUrl

必选特性。

请求被重定向到的 URL。 此 URL 通常是 Passport 登录页的 URL。

默认值为“internal”。

子元素

无。

父元素

元素

说明

configuration

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

system.web

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

authentication

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

备注

passport 元素指定要重定向到的页。如果该页要求身份验证,而用户尚未通过 Microsoft Passport 身份验证注册,则重定向到该页。 仅当 authentication 元素的 mode 特性设置为 Passport 时,此元素才有效。 有关更多信息,请参见 Passport Authentication Provider

默认配置

下面的默认 authentication 元素不是在计算机配置文件或根 Web.config 文件中显式配置的,而是由应用程序返回的默认配置。

<passport redirectUrl="internal" />

示例

下面的示例指定请求被定向到的登录页。

<configuration>
   <system.web>
      <authentication>
         <passport redirectUrl="Login.aspx"/>
      </authentication>
   </system.web>
</configuration>

元素信息

配置节处理程序

AuthenticationSection

配置成员

PassportAuthentication

可配置的位置

Machine.config

根级别的 Web.config

应用程序级别的 Web.config

要求

IIS 5.0、IIS 5.1 或 IIS 6.0

.NET Framework 1.0、1.1 或 2.0

Visual Studio 2003 或 Visual Studio 2005

请参见

任务

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

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

参考

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

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

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

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

configuration 元素(常规设置架构)

System.Configuration

System.Web.Configuration

AuthenticationSection

概念

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

保证 ASP.NET 配置的安全

ASP.NET 配置方案

其他资源

ASP.NET 身份验证

Passport Authentication Provider

常规配置设置 (ASP.NET)

ASP.NET 配置设置

ASP.NET 网站管理

ASP.NET 配置文件

ASP.NET 配置 API