.NET中Profile对象,书上反复讲的用户配置文件是什么东西

来源:百度知道 编辑:UC知道 时间:2024/06/14 10:01:37
.NET中Profile对象,书上反复讲的用户配置文件是什么东西,profile做什么用的我知道,可书上反复出现的自定义用户配置文件是指哪个?profile的inherit的那个类?还是存储数据库中的数据,还是什么其他的,哪位对这个清楚,解释下,谢谢
特别是对provider解释中的
“定义 ASP.NET 为使用自定义配置文件提供程序提供配置文件服务而实现的协定
ASP.NET 配置文件提供对用户特定属性的持久性存储和检索。配置文件属性值和信息按照由 ProfileProvider 实现确定的方式存储在数据源中

几个配置文件看着头晕,哪儿跟哪儿啊...
另外清楚的话顺便说下webconfig中的profile的必须属性是哪几个,具体什么意思我自己去查了

Profile是针对每个帐户的数据存储,比如一个电子商务网站的用户购物车数据。
“用户配置文件”是Profile这个词的直接翻译,其实没有文件的意思,默认存储在数据库中,不用自己管理文件。
Profile是HttpContext类的一个属性,是ProfileBase类,继承自SettingsBase类。
所谓Provider,是你可以定义Profile如何存储,默认是存储在LocalServer数据库中,需要网站重启动不丢失数据,所以不能存在内存中。
web.config中必须的Profile属性:什么叫必须?你如果不修改默认存储,只有每个Profile的name是必须的,如:
<profile defaultProvider="SqlProvider">//修改存储才需要
<providers>
<clear />
<add name="SqlProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="SqlServices"
applicationName="SampleApplication"
description="SqlProfileProvider for SampleApplication" />
</providers>

<properties>
<add name="ZipCode" />//用户配置的项目才是必须的
<add name="CityAndState" />
</properti