Welcome Guest! To enable all features please Login or Register.
Options
View
Go to last post Go to first unread
Offline mirwin  
#1 Posted : Thursday, October 16, 2008 11:19:33 PM(UTC)
mirwin


Rank: YAF Forumling

Reputation:

Joined: 10/16/2008(UTC)
Posts: 3

Here is the error:

Source Error:


Line 31: </td>
Line 32: <td class="post">
Line 33: <%# BBCode.EncodeHTML( PageContext.GetProfile( Eval("UserName"Wink.ToString() ).Location ) %>
Line 34: </td>
Line 35: <td class="post">


Source File: d:\Inetpub\PAXTalk\YAF\pages\admin\admin.ascx Line: 33

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
ASP.yaf_pages_admin_admin_ascx.__DataBind__control4(Object sender, EventArgs e) in d:\Inetpub\PAXTalk\YAF\pages\admin\admin.ascx:33
System.Web.UI.Control.OnDataBinding(EventArgs e) +99
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +92
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +211
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
System.Web.UI.Control.DataBind() +15
System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +124
System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +443
System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +51
System.Web.UI.WebControls.Repeater.DataBind() +75
System.Web.UI.Control.DataBindChildren() +211
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +211
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
System.Web.UI.Control.DataBind() +15
YAF.Pages.Admin.admin.BindData() in d:\Inetpub\PAXTalk\YAF\pages\admin\admin.ascx.cs:127
YAF.Pages.Admin.admin.Page_Load(Object sender, EventArgs e) in d:\Inetpub\PAXTalk\YAF\pages\admin\admin.ascx.cs:50
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


I am able to get this running on my local machine but when I load it on the server and go thru the exact same install steps I get the above error.

Any ideas?

Thanks
Sponsor
Offline Jaben  
#2 Posted : Saturday, October 18, 2008 7:16:53 AM(UTC)
Jaben


Rank: YAF Developer

Reputation:

Medals: Medal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.YAF.NET Supporter: Loves YAF.NET!YAF.NET Supporter: Supports our efforts. Thank you.Medal of Honor for the Support King: Given to a community member who tirelessly answers tons of support questions.

Joined: 10/9/2004(UTC)
Posts: 2,576
Location: United States

Thanks: 142 times
Was thanked: 347 time(s) in 197 post(s)
What are you profile provider settings in your web.config file?
Offline mirwin  
#3 Posted : Saturday, October 18, 2008 8:31:46 AM(UTC)
mirwin


Rank: YAF Forumling

Reputation:

Joined: 10/16/2008(UTC)
Posts: 3

<profile defaultProvider="SqlServerProfileProvider">
<providers>
<clear/>
<add name="SqlServerProfileProvider" connectionStringName="LocalSqlServer" type="System.Web.Profile.SqlProfileProvider"
applicationName="YetAnotherForum" description=""/>
</providers>
<properties>
<!--
Common Properties
-->
<add name="FirstName" type="System.String"/>
<add name="LastName" type="System.String"/>
<add name="MasterFilePreference" type="System.String"/>
<add name="ThemePreference" type="System.String"/>
<!--<add name="LastExport" type="System.Datetime"/>-->
<add name="EventColor" type="System.String" />
</properties>
</profile>
Offline Jaben  
#4 Posted : Monday, October 20, 2008 5:18:52 PM(UTC)
Jaben


Rank: YAF Developer

Reputation:

Medals: Medal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.YAF.NET Supporter: Loves YAF.NET!YAF.NET Supporter: Supports our efforts. Thank you.Medal of Honor for the Support King: Given to a community member who tirelessly answers tons of support questions.

Joined: 10/9/2004(UTC)
Posts: 2,576
Location: United States

Thanks: 142 times
Was thanked: 347 time(s) in 197 post(s)
It's required that it inherits from YafUserProfile or it will fail as you are seeing.

Fixed:

Code:
<profile defaultProvider="SqlServerProfileProvider" inherits="YAF.Classes.Utils.YafUserProfile">
<providers>
<clear/>
<add name="SqlServerProfileProvider" connectionStringName="LocalSqlServer" type="System.Web.Profile.SqlProfileProvider"
applicationName="YetAnotherForum" description=""/>
</providers>
<properties>
<!--
Common Properties
-->
<add name="FirstName" type="System.String"/>
<add name="LastName" type="System.String"/>
<add name="MasterFilePreference" type="System.String"/>
<add name="ThemePreference" type="System.String"/>
<!--<add name="LastExport" type="System.Datetime"/>-->
<add name="EventColor" type="System.String" />
</properties>
</profile>
Offline mirwin  
#5 Posted : Tuesday, October 21, 2008 4:15:34 AM(UTC)
mirwin


Rank: YAF Forumling

Reputation:

Joined: 10/16/2008(UTC)
Posts: 3

Worked like a charm!!!!

Thanks SOO much for your help.
Offline Jaben  
#6 Posted : Tuesday, October 21, 2008 8:52:48 AM(UTC)
Jaben


Rank: YAF Developer

Reputation:

Medals: Medal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.YAF.NET Supporter: Loves YAF.NET!YAF.NET Supporter: Supports our efforts. Thank you.Medal of Honor for the Support King: Given to a community member who tirelessly answers tons of support questions.

Joined: 10/9/2004(UTC)
Posts: 2,576
Location: United States

Thanks: 142 times
Was thanked: 347 time(s) in 197 post(s)
You're welcome.
Offline smokeyhotpot  
#7 Posted : Wednesday, January 28, 2009 5:12:42 PM(UTC)
smokeyhotpot


Rank: YAF Forumling

Reputation:

Joined: 1/28/2009(UTC)
Posts: 2

yea it still doesnt work! anyway could this be effective with both membership and rolemanagers having the SQL Providers etc as the defaultprovider and for profile is the default yaf provider?

i also tried using AspNetSqlProfileProvider as profile's defaultprovider, i didnt get the errors because i trimmed your codes from:

<%# BBCode.EncodeHTML( PageContext.GetProfile( Eval("UserName"Wink.ToString() ).Location ) %>

into

<%# BBCode.EncodeHTML( Eval("UserName"Wink.ToString() ) %>

it worked well but i dont think it's safe, would you recommend this???




Jaben wrote:
It's required that it inherits from YafUserProfile or it will fail as you are seeing.

Fixed:

Code:
<profile defaultProvider="SqlServerProfileProvider" inherits="YAF.Classes.Utils.YafUserProfile">
<providers>
<clear/>
<add name="SqlServerProfileProvider" connectionStringName="LocalSqlServer" type="System.Web.Profile.SqlProfileProvider"
applicationName="YetAnotherForum" description=""/>
</providers>
<properties>
<!--
Common Properties
-->
<add name="FirstName" type="System.String"/>
<add name="LastName" type="System.String"/>
<add name="MasterFilePreference" type="System.String"/>
<add name="ThemePreference" type="System.String"/>
<!--<add name="LastExport" type="System.Datetime"/>-->
<add name="EventColor" type="System.String" />
</properties>
</profile>

Offline JeremyCaney  
#8 Posted : Wednesday, July 21, 2010 1:07:56 PM(UTC)
JeremyCaney


Rank: YAF Forumling

Reputation:

Joined: 2/7/2010(UTC)
Posts: 5

Jaben -

Thanks for this information; it's exactly what I needed. When I saw that the recommended web.config contained custom providers I cringed as one of the key reasons I chose YAF was due to its support for ASP.NET 2.0's membership provider model. I'm glad to hear that we can use any provider.

It'd be nice if someone updated the wiki. It has an article (which I found before this post) on integrating with the ASP.NET membership provider and includes modifications to the source code. This appears to be based on a previous version which didn't support the ASP.NET membership provider. I suspect pursuing the approach suggested in that article will break the current release (if the associated files even exist anymore).

Jeremy
Rss Feed  Atom Feed
Users browsing this topic
guest
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.

Notification

Icon
Error