glynn
  • Posts: 16
  • Joined: 22/05/2009
I'm having the exact same problem.

I am using the YAF profile provider with my own membership provider.. YAF version is 1.9.3 final.

When I recycle the app pool on the web server is when the profile info disappears.

Now, I would love to implement the SqlProfileProvider, but when I try to do this without specifying the properties, it throws an error when trying to access the profile.

Can somebody please tell me what properties to set? I would expect that they are to be added similar to this:



<profile defaultProvider="CustomProfileProvider" enabled="true">
	<providers>
		<add name="CustomProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/"/>
	</providers>
	<!-- Define the properties for Profile... -->
	<properties>
	<add name="HomepageUrl" type="String" serializeAs="String"/>
		<group name="Bio">
				<add name="Title" type="String" serializeAs="String"/>
				<add name="FirstName" type="String" serializeAs="String"/>
				<add name="LastName" type="String" serializeAs="String"/>
				<add name="Email" type="String" serializeAs="String"/>
		</group>
	</properties>
</profile>



Of course, I'm assuming since jshepler said to use the SqlProfileProvider that this should work.

Otherwise, if there is a resolution to using the Yaf profile provider with another membership provider then please share.

Thanks,

Greg L.
glynn
  • Posts: 16
  • Joined: 22/05/2009
Update: I added the following in my web.config based on the yaf_prov_profile table columns:


<profile defaultProvider="CustomProfileProvider" enabled="true">
	<providers>
		<add name="CustomProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/"/>
	</providers>
	 
	<properties>
		<add name="YIM" type="String" serializeAs="String"/>
		<add name="Blog" type="String" serializeAs="String"/>
		<add name="Gender" type="Int" serializeAs="Binary"/>
		<add name="MSN" type="String" serializeAs="String"/>
		<add name="ICQ" type="String" serializeAs="String"/>
		<add name="Birthday" type="DateTime" serializeAs="Xml" />
		<add name="BlogServiceUsername" type="String" serializeAs="String"/>
		<add name="BlogServicePassword" type="String" serializeAs="String"/>
		<add name="AIM" type="String" serializeAs="String"/>
		<add name="GoogleTalk" type="String" serializeAs="String"/>
		<add name="Location" type="String" serializeAs="String"/>
		<add name="Interests" type="String" serializeAs="String"/>
		<add name="Homepage" type="String" serializeAs="String"/>
		<add name="Skype" type="String" serializeAs="String"/>
		<add name="RealName" type="String" serializeAs="String"/>
		<add name="BlogServiceUrl" type="String" serializeAs="String"/>
		<add name="Occupation" type="String" serializeAs="String"/>
	</properties>
</profile>


Anyhow, this doesn't work.. back to the drawing board, any help is much appreciated (sorry to hijack the thread but it's at least on topic :))
mddubs
  • Posts: 476
  • Joined: 07/08/2008
I use the SqlProfileProvider without specifying any properties.
UserPostedImage 
www.bunkerhollow.com  | www.careercomputing.com 
When I post fp:mddubs in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Mek 🙂, who stole this off Ederon 🙂 )
jshepler
  • Posts: 189
  • Joined: 09/08/2008
glynn wrote:

I'm having the exact same problem.

I am using the YAF profile provider with my own membership provider.. YAF version is 1.9.3 final.

When I recycle the app pool on the web server is when the profile info disappears.

Now, I would love to implement the SqlProfileProvider, but when I try to do this without specifying the properties, it throws an error when trying to access the profile.

Can somebody please tell me what properties to set? I would expect that they are to be added similar to this:



<profile defaultProvider="CustomProfileProvider" enabled="true">
	<providers>
		<add name="CustomProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/"/>
	</providers>
	<!-- Define the properties for Profile... -->
	<properties>
	<add name="HomepageUrl" type="String" serializeAs="String"/>
		<group name="Bio">
				<add name="Title" type="String" serializeAs="String"/>
				<add name="FirstName" type="String" serializeAs="String"/>
				<add name="LastName" type="String" serializeAs="String"/>
				<add name="Email" type="String" serializeAs="String"/>
		</group>
	</properties>
</profile>



Of course, I'm assuming since jshepler said to use the SqlProfileProvider that this should work.

Otherwise, if there is a resolution to using the Yaf profile provider with another membership provider then please share.

Thanks,

Greg L.


You need to add inherits="YAF.Classes.Utils.YafUserProfile" to the <profile> tag. You do not need to add any properties or anything for yaf to work.

<profile enabled="true" defaultProvider="CustomProfileProvider" inherits="YAF.Classes.Utils.YafUserProfile">

not jsheLPer
glynn
  • Posts: 16
  • Joined: 22/05/2009
Outstanding! That did it, thanks. :cheesy:
Forum Jump  
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved