Kenn
Kenn

Reputation: 2769

where is ProfileBase.Save() storing my data?

where is ProfileBase.Save() storing my data?

I created a custom profile it looks like this

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; }
        }
    } 

My web.config looks like this

<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" />

I can see it recreate the database "aspnet-TaskBoardAuth-20120711211831" (if I delete it) and I wrote a method to save some test data to the description for my user and sure enough it saves but I can't for the life of me figure out where? I figured it would be in the profiles table but it isn't. I know it isn't putting it in a cookie because I wiped those out. I am stumped. Much googling failed to give me the answer.

if someone could please let me know that would rule!

Upvotes: 1

Views: 708

Answers (1)

Kenn
Kenn

Reputation: 2769

Uhm, this is indeed storing data in the Profiles table where I would have expected it - not sure what was going on the other night. Satan unicorns where trying to destroy my life? That might be possible.

Upvotes: 1

Related Questions