ProfileModule クラスとは? わかりやすく解説

ProfileModule クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

ユーザー プロファイルプロファイル イベント作成管理します。このクラス継承できません。

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

Public NotInheritable Class
 ProfileModule
    Implements IHttpModule
Dim instance As ProfileModule
public sealed class ProfileModule : IHttpModule
public ref class ProfileModule sealed : IHttpModule
public final class ProfileModule implements
 IHttpModule
public final class ProfileModule implements
 IHttpModule
解説解説
使用例使用例

匿名ユーザーサポートする匿名識別およびプロファイル プロパティ有効にする 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セキュリティ
継承階層継承階層
System.Object
  System.Web.Profile.ProfileModule
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「ProfileModule クラス」の関連用語

ProfileModule クラスのお隣キーワード
検索ランキング

   

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



ProfileModule クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS