配置profile来对匿名用户和认证用户的某些信息进行保存,当用户一段时间后登录,要保持这信息依然存在,需不需要通过aspnet_regsql来附加到数据库?谢谢
解决方案 »
- asp.net回发问题
- 让人疯狂的ACCESS. 时间字段无法用parameters声明
- 对IT公司(部门)的建议及意见?[强烈推荐]
- asp的一条语句如何转化为asp.net呢?
- 大家帮我看看,这个产品比较的该用什么控件呢?
- 文件上传覆盖
- 自定义com+控件为何没办法加载,大家给我看看,急死我了
- 小弟刚刚学ASP.NET,请问新闻中怎么分页呢?
- **************************请问谁做过Activex控件签名的***********************
- 使用HTML控件传递数据给ASPX,但似乎无法传递中文字符串?请教!急!
- 如何从已有记录中取得字段值,并放到textbox.text中
- 设计用户控件的css路径问题
<configuration>
<connectionStrings>
<add
name="myConnectionString"
connectionString=
"Server=MyServer;Trusted_Connection=true;database=MyDatabase" />
</connectionStrings>
<system.web>
<anonymousIdentification enabled="true" />
<profile defaultProvider="MyProfileProvider">
<providers>
<add
name="MyProfileProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="myConnectionString" />
</providers>
<properties>
<add
name="FirstName"
allowAnonymous="true" />
<add
name="LastName"
allowAnonymous="true" />
</properties>
</profile>
</system.web>
</configuration>类似这样profile配置中,包含了一个defaultProvider特性,这个特性指向一个叫MyProfileProvider的 profile provider,而这个provider定义是在profile标记的<providers>节中完成的。 MyProfileProvider则使用一个叫MyConnectionString的连接字符串完成数据库连接,并保存profile信息到数据库中