Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP.NET Profile Provider Not Working

Reply
Thread Tools

ASP.NET Profile Provider Not Working

 
 
=?Utf-8?B?RGlya0dvZXM=?=
Guest
Posts: n/a
 
      11-13-2007
I have added some profile properties to my web.config:
<profile enabled="true">
<properties><add name="firstname"/></properties>
</profile>
However when I try to access the property in a code behind it does not
exist. The following code does not work (says firstname is not a property):

Profile.firstname

I have rebuilt the solution. I am using VB.NET


 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      11-13-2007
re:
!> when I try to access the property in a code behind it does not exist.

You need to add the data type, too.

<profile enabled="true">
<properties>
<add name="firstname" type="string"/>
<add name="Country" type="string"/>
<add name="Gender" type="string"/>
<add name="Age" type="Int32"/>
</properties>
</profile>

Please review Scott Guthrie's Profile blog entry at :

http://weblogs.asp.net/scottgu/archi...18/427754.aspx

Also, Scott Mitchell's 9-part membership tutorial helps a lot,
particularly part 6, for implementing custom profile properties :

http://aspnet.4guysfromrolla.com/articles/101106-1.aspx

Scott details other properties you can add which you might want to explore.

There's a code sample for the part 6 article at :
http://aspnet.4guysfromrolla.com/code/Membership.6.zip



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espa˝ol : http://asp.net.do/foros/
======================================
"DirkGoes" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have added some profile properties to my web.config:
> <profile enabled="true">
> <properties><add name="firstname"/></properties>
> </profile>
> However when I try to access the property in a code behind it does not
> exist. The following code does not work (says firstname is not a property):
>
> Profile.firstname
>
> I have rebuilt the solution. I am using VB.NET
>
>




 
Reply With Quote
 
 
 
 
=?Utf-8?B?RGlya0dvZXM=?=
Guest
Posts: n/a
 
      11-14-2007
Thanks Juan, I did read some of these posts, but my profile will still not
activate. Apprently when you add the properties to web.config the role
provider class gets recompiled. But this does not seem to happen for me.

In the meantime I have written my own profile table. I spent half a day on
it and had to move on.

"Juan T. Llibre" wrote:

> re:
> !> when I try to access the property in a code behind it does not exist.
>
> You need to add the data type, too.
>
> <profile enabled="true">
> <properties>
> <add name="firstname" type="string"/>
> <add name="Country" type="string"/>
> <add name="Gender" type="string"/>
> <add name="Age" type="Int32"/>
> </properties>
> </profile>
>
> Please review Scott Guthrie's Profile blog entry at :
>
> http://weblogs.asp.net/scottgu/archi...18/427754.aspx
>
> Also, Scott Mitchell's 9-part membership tutorial helps a lot,
> particularly part 6, for implementing custom profile properties :
>
> http://aspnet.4guysfromrolla.com/articles/101106-1.aspx
>
> Scott details other properties you can add which you might want to explore.
>
> There's a code sample for the part 6 article at :
> http://aspnet.4guysfromrolla.com/code/Membership.6.zip
>
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espa├▒ol : http://asp.net.do/foros/
> ======================================
> "DirkGoes" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I have added some profile properties to my web.config:
> > <profile enabled="true">
> > <properties><add name="firstname"/></properties>
> > </profile>
> > However when I try to access the property in a code behind it does not
> > exist. The following code does not work (says firstname is not a property):
> >
> > Profile.firstname
> >
> > I have rebuilt the solution. I am using VB.NET
> >
> >

>
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
<profile><properties> with no Profile class Steven ASP .Net 5 10-24-2008 07:23 PM
Visual Studio 2008 asp.net web administration>profile: "The profile wasn't created"? Andy B ASP .Net 0 05-03-2008 05:15 PM
Want to profile monitor for Fuji Frontier ICC profile? Lynn Digital Photography 9 09-08-2005 12:17 PM
Java Web Start app icons keep going in user profile not All Users profile Brad Java 1 07-19-2005 02:10 AM
Custom profile provider asp.net 2.0 =?Utf-8?B?Z2V0ZG90bmV0?= ASP .Net 0 07-06-2005 07:45 PM



Advertisments