FormsAuthenticationConfiguration.RequireSSL 属性

定义

获取或设置一个值,该值指示传输身份验证信息时是否需要安全套接字层 (SSL) 连接。

public:
 property bool RequireSSL { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("requireSSL", DefaultValue=false)]
public bool RequireSSL { get; set; }
[<System.Configuration.ConfigurationProperty("requireSSL", DefaultValue=false)>]
member this.RequireSSL : bool with get, set
Public Property RequireSSL As Boolean

属性值

true 如果需要 SSL 连接,则为否则,为 false. 默认值为 false

属性

示例

下面的代码示例演示如何访问 RequireSSL 属性。请参阅类主题中的 FormsAuthenticationConfiguration 代码示例,了解如何获取该节。

// Create a new FormsAuthentication object.
FormsAuthenticationConfiguration newformsAuthentication =
new FormsAuthenticationConfiguration();
' Create a new FormsAuthentication object.
Dim newformsAuthentication _
As New FormsAuthenticationConfiguration()

注解

RequireSSL如果是true,Web 应用程序将拒绝不使用 SSL 连接的所有表单身份验证请求。

适用于

另请参阅