Share via


profile の properties 要素 (ASP.NET 設定スキーマ)

[このドキュメントはプレビューのみを目的としており、以降のリリースで変更される可能性があります。プレースホルダーとして空白のトピックが含まれています。]

ユーザー プロファイル プロパティおよびプロパティ グループのコレクションを定義します。

この要素は、.NET Framework Version 2.0 で追加されました。

<properties>
    <add... />
    <clear />
    <remove... />
    <group>...</group>
</properties>

属性および要素

以降のセクションでは、属性、子要素、および親要素について説明します。

属性

なし。

子要素

要素

Description

add

省略可能な要素です。

ユーザー プロファイルにプロパティを追加します。

clear

省略可能な要素です。

ユーザー プロファイルから定義済みのすべてのプロパティを削除します。

group

省略可能な要素です。

ユーザー プロファイル プロパティのグループ化を定義します。

remove

省略可能な要素です。

ユーザー プロファイルからプロパティを削除します。

親要素

要素

Description

configuration

共通言語ランタイムおよび .NET Framework アプリケーションで使用されるすべての構成ファイルで必要なルート要素を指定します。

system.web

ASP.NET 構成セクションのルート要素を指定します。

profile

アプリケーションのユーザー プロファイルを構成します。

解説

アプリケーション コード内の profile 要素の構成値のアクセスおよび変更方法については、ProfileSection クラスを参照してください。

使用例

次の Web.config ファイルの例では、文字列型の ZipCode プロパティおよび StringCollection 型の RecentSearchList プロパティを含むユーザー プロファイルを指定します。 生成された Profile には、指定した各プロパティの厳密に型指定されたアクセサーが含まれます。 ユーザー プロファイル、およびユーザー プロファイル プロパティの設定と読み込みの例については、「ASP.NET Profile Properties Overview」を参照してください。

<configuration>
   <connectionStrings>
       <add name="SqlServices" connectionString="Data Source=localhost;Integrated Security=SSPI;Initial 
            Catalog=aspnetdb;" />
   </connectionStrings>

  <system.web>
   <anonymousIdentification enabled="true" />

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

     <properties>
       <add name="ZipCode" allowAnonymous="true" />
       <add name="RecentSearchList"
            type="System.Collections.Specialized.StringCollection"
            serializeAs="Xml"
            allowAnonymous="true" />
      </properties>
    </profile>
   </system.web>
</configuration>

要素情報

構成セクション ハンドラー

System.Web.Configuration.ProfileSection

構成メンバー

SystemWebSectionGroup.Profile

構成できる場所

Machine.config

ルート レベルの Web.config

アプリケーション レベルの Web.config

要件

Microsoft Internet Information Services (IIS) バージョン 5.0、5.1、または 6.0

.NET Framework Version 2.0

Microsoft Visual Studio 2005

参照

処理手順

How to: Lock ASP.NET Configuration Settings

Reference

profile 要素 (ASP.NET 設定スキーマ)

system.web 要素 (ASP.NET 設定スキーマ)

<configuration> 要素

profile の properties の add 要素 (ASP.NET 設定スキーマ)

profile の properties の clear 要素 (ASP.NET 設定スキーマ)

profile の properties の group 要素 (ASP.NET 設定スキーマ)

profile の properties の remove 要素 (ASP.NET 設定スキーマ)

ProfileSection

System.Configuration

System.Web.Configuration

概念

ASP.NET Profile Properties Overview

ASP.NET Configuration Overview

ASP.NET Server Controls and Browser Capabilities

Securing Configuration

Configuration Inheritance

その他の技術情報

ASP.NET Configuration Files

ASP.NET 構成設定

全般構成設定 (ASP.NET)

ASP.NET Configuration API