ProfileMigrateEventHandler デリゲートとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ProfileMigrateEventHandler デリゲートの意味・解説 

ProfileMigrateEventHandler デリゲート

メモ : このデリゲートは、.NET Framework version 2.0新しく追加されたものです。

ProfileModule クラスMigrateAnonymous イベント処理するメソッド表します

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

Public Delegate Sub ProfileMigrateEventHandler
 ( _
    sender As Object, _
    e As ProfileMigrateEventArgs _
)
Dim instance As New ProfileMigrateEventHandler(AddressOf
 HandlerMethod)
public delegate void ProfileMigrateEventHandler
 (
    Object sender,
    ProfileMigrateEventArgs e
)
public delegate void ProfileMigrateEventHandler
 (
    Object^ sender, 
    ProfileMigrateEventArgs^ e
)
/** @delegate */
public delegate void ProfileMigrateEventHandler
 (
    Object sender, 
    ProfileMigrateEventArgs e
)
JScript では、デリゲート使用できますが、新規に宣言することはできません。

パラメータ

sender

MigrateAnonymous イベントの発生元の ProfileModule。

e

イベント データ格納している ProfileMigrateEventArgs。

解説解説
使用例使用例

匿名認証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(); 
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

ProfileMigrateEventHandler デリゲートのお隣キーワード
検索ランキング

   

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



ProfileMigrateEventHandler デリゲートのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS