Jeff and .NET

The .NET musings of Jeff Putz

Sponsors

News

My Sites

Are programmatic Profile properties possible?

I really dig Profile in ASP.NET. It's a good system and I'm all about common and easy to use API's. What I don't like is the web.config mess.

So my question is, is there a way to programmatically specify Profile properties instead of sketching them out one by one in web.config? I swear I think I saw something like that but I can't find it.

Posted: Aug 01 2006, 09:28 AM by Jeff | with 5 comment(s)
Filed under:

Comments

Sam said:

I guess you could always set the Web.Config properties programmatically ;)

# August 1, 2006 10:54 AM

Geoff Stockham said:

Inherit from ProfileBase.  See here:

http://fredrik.nsquared2.com/viewpost.aspx?PostID=353

# August 1, 2006 10:57 AM

Daniel said:

What's really happening there (I think) is that a build provider is generating the code for a class that inherits from ProfileBase, based on the properties and groups set up in web.config.  Personally, I think that's awesome for this sort of data.  It's done as a partial class, so you can even add methods and properties.  If you examine that generated code, you should be able to see what's going on and create your own.  Another option would be to write a custom profile provider to store and retrieve your own object types...

# August 1, 2006 1:48 PM

Jeff said:

Yes, looking at the generated code is helpful. The next part is getting to figure out how to do the same thing with groups within the profile. Porting the generated code doesn't work.

# August 1, 2006 3:13 PM

Jeff's Junk said:

First off, thank you to Geoff for pointing me to Fredrik's excellent post on programmatically setting

# August 1, 2006 3:51 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)