ProfileManager.AutomaticSaveEnabled プロパティ

定義

ASP.NET ページの実行が終了したときにユーザー プロファイルが自動保存されるかどうかを示す値を取得します。

public:
 static property bool AutomaticSaveEnabled { bool get(); };
public static bool AutomaticSaveEnabled { get; }
static member AutomaticSaveEnabled : bool
Public Shared ReadOnly Property AutomaticSaveEnabled As Boolean

プロパティ値

ASP.NET ページの実行が終了したときにユーザー プロファイルが自動保存される場合は true。それ以外の場合は false。 既定値は、true です。

例外

AutomaticSaveEnabled プロパティ値を取得しようとしましたが、最低限必要な Medium アクセス許可がありません。

次の構成ファイルの抜粋は、ASP.NET アプリケーションのWeb.config ファイルの system.web セクションの profile 要素を示しています。 アプリケーションの既定のプロファイル プロバイダーを インスタンスに SqlProfileProvider 指定し、 属性を automaticSaveEnabledtrue設定します。

<profile enabled="true"
  automaticSaveEnabled="true"
  defaultProvider="SqlProvider">
  <providers>
    <add name="SqlProvider"
      type="System.Web.Profile.SqlProfileProvider"
      connectionStringName="SqlServices"
      applicationName="MyApplication" />
  </providers>
</profile>

注釈

プロパティは AutomaticSaveEnabled 、アプリケーションに対してユーザー プロファイルの自動保存が有効になっているかどうかを示します。 自動保存が有効になっている場合、ProfileModuleオブジェクトは イベントをProfileAutoSaving発生させ、ASP.NET ページの実行中に イベント中に メソッドEndRequestを呼び出Saveします。

プロパティはAutomaticSaveEnabled、ASP.NET アプリケーションのWeb.config ファイル内の profile 要素の属性を使用してautomaticSaveEnabled設定されます。

適用対象

こちらもご覧ください