2012-07-13 120 views
1

ProfileBase.Save()存储我的数据在哪里?ProfileBase.Save()存储我的数据在哪里?

我创建了一个自定义配置文件,它看起来像这样

public class UserProfile : ProfileBase 
{ 
     public static UserProfile GetUserProfile(string username) 
     { 
      return Create(username) as UserProfile; 
     } 

     public static UserProfile GetUserProfile() 
     { 
      return Create(Membership.GetUser().UserName) as UserProfile; 
     } 

     [SettingsAllowAnonymous(false)] 
     public string Description 
     { 
      get { return base["Description"] as string; } 
      set { base["Description"] = value; } 
     } 

     [SettingsAllowAnonymous(false)] 
     public string Location 
     { 
      get { return base["Location"] as string; } 
      set { base["Location"] = value; } 
     } 
    } 

我的web.config看起来像这样

<profile inherits="TaskBoardAuth.Models.UserProfile"> 
    <providers> 
    <add name="DefaultProfileProvider" 
     type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
     connectionStringName="DefaultConnection" 
     applicationName="/" /> 
    </providers> 
</profile> 

<add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=aspnet-TaskBoardAuth-20120711211831;Integrated Security=SSPI" /> 

我可以看到它重新创建数据库 “ASPNET-TaskBoardAuth-20120711211831”(如果我删除它),我写了一个方法来保存一些测试数据到我的用户的描述,并确实足以节省,但我不能为我的生活弄清楚在哪里?我想它会在配置文件表中,但事实并非如此。我知道它没有把它放在cookie中,因为我把它们擦掉了。我很难过。很多使用Google的人未能给我答案。

如果有人可以请让我知道,将统治!

+0

什么都没有?这是一个蹩脚的问题?我错过了明显的东西吗? – Kenn 2012-07-14 03:03:27

回答

1

呃,这实际上是将数据存储在配置文件表中,我可以预期它 - 不知道那天晚上发生了什么。撒旦独角兽试图摧毁我的生命?这可能是可能的。