ASP.NET配置文件属性-使用C#MVC
我正在使用.NET4.0的C#MVC 我正在尝试实现在上看到的ASP.NET配置文件属性 首先,我在web.config文件中添加了以下内容。请注意,我正在尝试存储给定用户的位置:ASP.NET配置文件属性-使用C#MVC,c#,C#,我正在使用.NET4.0的C#MVC 我正在尝试实现在上看到的ASP.NET配置文件属性 首先,我在web.config文件中添加了以下内容。请注意,我正在尝试存储给定用户的位置: <profile> <properties> <add name="Location" /> </properties> <providers> <clear /> &l
<profile>
<properties>
<add name="Location" />
</properties>
<providers>
<clear />
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
</providers>
</profile>
我收到一个错误,无法解析“配置文件”。是否有人使用了可以提供帮助的Profile属性?请注意,我甚至无法找到文章中提到的类
谢谢配置文件必须属于用户/成员,因此在向其添加任何配置文件属性之前,您必须加载或创建新用户
Profile.Location = model.Location;