ProfileMigrateEventArgs.AnonymousID プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ProfileMigrateEventArgs.AnonymousID プロパティの意味・解説 

ProfileMigrateEventArgs.AnonymousID プロパティ

メモ : このプロパティは、.NET Framework version 2.0 で新しく追加されたものです。

プロファイルのプロパティ値を移行する先の匿名プロファイルの、匿名 ID を取得します。

名前空間: System.Web.Profile
アセンブリ: System.Web (system.web.dll 内)
構文構文

Dim instance As ProfileMigrateEventArgs
Dim value As String

value = instance.AnonymousID
public string AnonymousID { get;
 }
public:
property String^ AnonymousID {
    String^ get ();
}
/** @property */
public String get_AnonymousID ()

プロパティ値
プロファイルのプロパティ値を移行する先の匿名プロファイルの、匿名 ID。

解説解説
使用例使用例

匿名認証と ASP.NET アプリケーションの Global.asax ファイルに含まれる MigrateAnonymous イベントを有効にする Web.config ファイルを次のコード例に示します。

匿名識別および匿名ユーザーをサポートするプロファイル プロパティを有効にする Web.config ファイルを次のコード例に示します。

<configuration>
  <system.web>
    <authentication mode="Forms" >
      <forms loginUrl="login.aspx" name=".ASPXFORMSAUTH" />
    </authentication>

    <AnonymousIdentification enabled="true" />

    <profile enabled="true" defaultProvider="AspNetSqlProvider">
      <properties>
        <add name="ZipCode" allowAnonymous="true" />
        <add name="CityAndState" allowAnonymous="true" />
        <add name="StockSymbols" type="System.Collections.ArrayList" allowAnonymous="true"
 />
      </properties>
    </profile>
  </system.web>
</configuration>

ASP.NET アプリケーションの Global.asax ファイルに含まれる MigrateAnonymous イベントを次のコード例に示します。MigrateAnonymous イベントは、匿名プロファイルから現在のユーザーのプロファイルへと、プロファイルのプロパティ値をコピーします。

Public Sub Profile_OnMigrateAnonymous(sender
 As Object, args As ProfileMigrateEventArgs)
  Dim anonymousProfile As ProfileCommon = Profile.GetProfile(args.AnonymousID)

  Profile.ZipCode = anonymousProfile.ZipCode
  Profile.CityAndState = anonymousProfile.CityAndState
  Profile.StockSymbols = anonymousProfile.StockSymbols

  ''''''''
  ' Delete the anonymous profile. If the anonymous ID is not 
  ' needed in the rest of the site, remove the anonymous cookie.

  ProfileManager.DeleteProfile(args.AnonymousID)
  AnonymousIdentificationModule.ClearAnonymousIdentifier()
End Sub
public void Profile_OnMigrateAnonymous(object
 sender, ProfileMigrateEventArgs args)
{
  ProfileCommon anonymousProfile = Profile.GetProfile(args.AnonymousID);

  Profile.ZipCode = anonymousProfile.ZipCode;
  Profile.CityAndState = anonymousProfile.CityAndState;
  Profile.StockSymbols = anonymousProfile.StockSymbols;

  ////////
  // Delete the anonymous profile. If the anonymous ID is not 
  // needed in the rest of the site, remove the anonymous cookie.

  ProfileManager.DeleteProfile(args.AnonymousID);
  AnonymousIdentificationModule.ClearAnonymousIdentifier(); 
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

ProfileMigrateEventArgs.AnonymousID プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ProfileMigrateEventArgs.AnonymousID プロパティのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS