FormsAuthenticationConfiguration.Credentials プロパティ
アセンブリ: System.Web (system.web.dll 内)

Public ReadOnly Property Credentials As FormsAuthenticationCredentials
Dim instance As FormsAuthenticationConfiguration Dim value As FormsAuthenticationCredentials value = instance.Credentials
public FormsAuthenticationCredentials Credentials { get; }
public: property FormsAuthenticationCredentials^ Credentials { FormsAuthenticationCredentials^ get (); }
ユーザー名とパスワードが格納される FormsAuthenticationCredentials コレクション。

Credentials プロパティは、フォーム ベース認証で使用されるユーザー名とパスワードを取得します。
![]() |
---|
セキュリティが求められる場合には、データベース ストアなど、別の方法で、ユーザー名とパスワードを保管してください。このコレクションを使用する場合、提供される暗号化機能を使用する必要があります。 |

Credentials プロパティへのアクセス方法を次のコード例に示します。セクションを取得する方法については、FormsAuthenticationConfiguration クラスのトピックにあるコード例を参照してください。
' Get the current Credentials. Dim currentCredentials _ As FormsAuthenticationCredentials = _ formsAuthentication.Credentials Dim credentials As New StringBuilder() ' Get all the credentials. Dim i As System.Int32 For i = 0 To currentCredentials.Users.Count - 1 credentials.Append(("Name: " + _ currentCredentials.Users(i).Name + _ " Password: " + _ currentCredentials.Users(i).Password)) credentials.Append(Environment.NewLine) Next i
// Get the current Credentials. FormsAuthenticationCredentials currentCredentials = formsAuthentication.Credentials; StringBuilder credentials = new StringBuilder(); // Get all the credentials. for (System.Int32 i = 0; i < currentCredentials.Users.Count; i++) { credentials.Append("Name: " + currentCredentials.Users[i].Name + " Password: " + currentCredentials.Users[i].Password); credentials.Append(Environment.NewLine); }

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からFormsAuthenticationConfiguration.Credentials プロパティを検索する場合は、下記のリンクをクリックしてください。

- FormsAuthenticationConfiguration.Credentials プロパティのページへのリンク