2012-07-13 124 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

呃,這實際上是將數據存儲在配置文件表中,我可以預期它 - 不知道那天晚上發生了什麼。撒旦獨角獸試圖摧毀我的生命?這可能是可能的。