FormsAuthentication.Authenticate(String, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
The recommended alternative is to use the Membership APIs, such as Membership.ValidateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.
驗證使用者名稱與密碼,以符合應用程式設定檔中儲存的憑證。
public:
static bool Authenticate(System::String ^ name, System::String ^ password);
public static bool Authenticate(string name, string password);
[System.Obsolete("The recommended alternative is to use the Membership APIs, such as Membership.ValidateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.")]
public static bool Authenticate(string name, string password);
static member Authenticate : string * string -> bool
[<System.Obsolete("The recommended alternative is to use the Membership APIs, such as Membership.ValidateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.")>]
static member Authenticate : string * string -> bool
Public Shared Function Authenticate (name As String, password As String) As Boolean
參數
- name
- String
使用者名稱。
- password
- String
使用者的密碼。
傳回
true若使用者名稱與密碼有效;否則,。 false
- 屬性
備註
這個方法已過時。 建議的替代方案是使用 Membership API,例如 Membership.ValidateUser(String, String)。 欲了解更多資訊,請參閱「 使用會員管理使用者」。