System.Web.Profile 命名空間
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
包含用於處理網頁伺服器應用程式中 ASP.NET 使用者設定檔的類別。
類別
| 名稱 | Description |
|---|---|
| CustomProviderDataAttribute |
提供自訂數據的字串給配置檔屬性的提供者。 |
| DefaultProfile |
代表未定義設定檔屬性的使用者設定檔實例。 |
| ProfileAutoSaveEventArgs |
提供類別 ProfileAutoSaving 事件 ProfileModule 的資料。 |
| ProfileBase |
提供無需類型存取的個人資料、屬性、價值與資訊。 |
| ProfileEventArgs |
提供類別 Personalize 事件 ProfileModule 的資料。 |
| ProfileGroupBase |
提供無類型存取群組 ASP.NET 屬性價值。 |
| ProfileInfo |
提供使用者資料的資訊。 |
| ProfileInfoCollection |
物件的 ProfileInfo 集合。 |
| ProfileManager |
管理使用者個人資料資料與設定。 |
| ProfileMigrateEventArgs |
提供類別 MigrateAnonymous 事件 ProfileModule 的資料。 |
| ProfileModule |
管理使用者個人檔案及個人檔案事件的建立。 無法繼承這個類別。 |
| ProfileProvider |
定義 ASP.NET 實施的合約,以利用自訂設定檔提供者提供設定檔服務。 |
| ProfileProviderAttribute |
識別使用者配置檔屬性的配置檔提供者。 |
| ProfileProviderCollection |
一組繼承抽象類別的 ProfileProvider 物件。 |
| SettingsAllowAnonymousAttribute |
識別是否可以為匿名用戶設定或存取配置檔屬性。 |
| SqlProfileProvider |
管理 SQL Server 資料庫中 ASP.NET 應用程式的設定檔資訊儲存。 |
列舉
| 名稱 | Description |
|---|---|
| ProfileAuthenticationOption |
描述要搜尋的使用者配置檔驗證類型。 |
委派
| 名稱 | Description |
|---|---|
| ProfileAutoSaveEventHandler |
代表將處理ProfileAutoSavingProfileModule事件的方法。 |
| ProfileEventHandler |
代表將處理PersonalizeProfileModule事件的方法。 |
| ProfileMigrateEventHandler |
代表將處理 MigrateAnonymous 類別事件 ProfileModule 的方法。 |
備註
ASP.NET 設定檔用於儲存和檢索使用者設定,儲存在資料庫等資料來源中。 房況資訊與房產價值由房況提供者管理。 設定檔資訊可以透過使用 該 SqlProfileProvider 類別儲存在 Microsoft SQL Server 資料庫中,或透過抽象類別的實作 ProfileProvider 儲存在自訂資料來源中。
ASP.NET 設定檔可透過 設定檔 設定區段進行設定。
當一個應用程式啟動且啟用了設定檔時,ASP.NET 會建立一個新的類型 ProfileCommon類別,該類別繼承自該 ProfileBase 類別。 在設定檔設定區段中定義的每個屬性,都會為類別加入ProfileCommon強型別的 accessr。 該類別的實例ProfileCommon被設定為當前HttpContext物件屬性的Profile值。 你可以建立一個自訂的設定檔實作,繼承自ProfileBase抽象類別,並為使用者設定檔定義設定檔設定元素中未指定的屬性。