FormsAuthenticationUserCollection.Set メソッド
アセンブリ: System.Web (system.web.dll 内)

Dim instance As FormsAuthenticationUserCollection Dim user As FormsAuthenticationUser instance.Set(user)

' Using method Set. ' Define the SHA1 encrypted password. Dim newPassword As String = _ "5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8" ' Define the user name. Dim currentUserName As String = "userName" ' Create the new user. Dim theUser _ As New FormsAuthenticationUser(currentUserName, newPassword) formsAuthenticationCredentials.Users.Set(theUser) If Not authenticationSection.SectionInformation.IsLocked Then configuration.Save() End If
// Using method Set. // Define the SHA1 encrypted password. string newPassword = "5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8"; // Define the user name. string currentUserName = "userName"; // Create the new user. FormsAuthenticationUser theUser = new FormsAuthenticationUser(currentUserName, newPassword); formsAuthenticationCredentials.Users.Set(theUser); if (!authenticationSection.SectionInformation.IsLocked) { configuration.Save(); }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- FormsAuthenticationUserCollection.Set メソッドのページへのリンク