CandiceS
  • Posts: 29
  • Joined: 05/05/2014
I'm new to YAF and have been told by my boss that I need to implement YAF into a website we are developing for a client.
I would like to find out how to do this from scratch as I have looked at the YAF.SampleWebApplication, but I'm not sure how to go about putting this into our solution.
Any input and guidelines would be appreciated.
Sponsor
Zero2Cool
  • Posts: 1082
  • Joined: 26/04/2011
What kind of application are you trying to incorporate YAF into?

What have you tried?

What errors have you encountered?
CandiceS
  • Posts: 29
  • Joined: 05/05/2014
I'm looking at version 2.1.1. and I have only looked at the solution and haven't tried to implement it just yet.
We have an asp.net 4.0 web application (website) written in C# for the client.
tha_watcha
  • Posts: 4079
  • Joined: 06/03/2010
Originally Posted by: CandiceS

I'm new to YAF and have been told by my boss that I need to implement YAF into a website we are developing for a client.
I would like to find out how to do this from scratch as I have looked at the YAF.SampleWebApplication, but I'm not sure how to go about putting this into our solution.
Any input and guidelines would be appreciated.



The quick guide might help

https://github.com/YAFNE...ting-ASP.NET-Application 

UserPostedImage
CandiceS
  • Posts: 29
  • Joined: 05/05/2014
Thanks, would I use the YAF.SampleWebApplication for the manual part, or must this be the install version of YAF.
tha_watcha
  • Posts: 4079
  • Joined: 06/03/2010
Originally Posted by: CandiceS

Thanks, would I use the YAF.SampleWebApplication for the manual part, or must this be the install version of YAF.



No use the regular install version.
UserPostedImage
CandiceS
  • Posts: 29
  • Joined: 05/05/2014
Thank you, will give it a try
CandiceS
  • Posts: 29
  • Joined: 05/05/2014
Ok, I followed the guide and have the forum in my website using my masterpage.
All the links work, but I'm getting an error when trying to view my profile, post a topic, comment, etc.
I'm trying to use my websites membership provider and roleManager, which seems to work for the login, but now I'm not sure if this is causing the issue.
tha_watcha
  • Posts: 4079
  • Joined: 06/03/2010
Originally Posted by: CandiceS

Ok, I followed the guide and have the forum in my website using my masterpage.
All the links work, but I'm getting an error when trying to view my profile, post a topic, comment, etc.
I'm trying to use my websites membership provider and roleManager, which seems to work for the login, but now I'm not sure if this is causing the issue.



What errors did you get?
UserPostedImage
CandiceS
  • Posts: 29
  • Joined: 05/05/2014
I get the following error page:

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
YAF.Pages.profile.SetupUserProfileInfo(Int32 userID, MembershipUser user, IUserData userData, String userDisplayName) +1115
YAF.Pages.profile.BindData() +503
YAF.Pages.profile.Page_Load(Object sender, EventArgs e) +668
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.LoadRecursive() +70
System.Web.UI.Control.LoadRecursive() +189
System.Web.UI.Control.LoadRecursive() +189
System.Web.UI.Control.LoadRecursive() +189
System.Web.UI.Control.LoadRecursive() +189
System.Web.UI.Control.LoadRecursive() +189
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3177

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34009
Zero2Cool
  • Posts: 1082
  • Joined: 26/04/2011
Do you have this published online yet? If so, can you share the URL?
CandiceS
  • Posts: 29
  • Joined: 05/05/2014
No, the website isn't live yet.

This error occurs when I click the logged in users username to view the profile. The link goes to this url:
http://localhost/forum/default.aspx?g=profile&u=4
Zero2Cool
  • Posts: 1082
  • Joined: 26/04/2011
Try clicking a users profile on this very site. I think you are getting the same error and this is a bug perhaps?

CandiceS
  • Posts: 29
  • Joined: 05/05/2014
Looks like it, just where the error is coming up is not on the same line.
I'm also having the issue when I try to go into a topic (view posts) or create a topic.

When I try to view the following link (http://localhost/forum/default.aspx?g=posts&t=1) I get this error:
Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
YAF.Controls.DisplayPostFooter.DisplayPostFooter_PreRender(Object sender, EventArgs e) +1746
System.Web.UI.Control.PreRenderRecursiveInternal() +112
System.Web.UI.Control.PreRenderRecursiveInternal() +221
System.Web.UI.Control.PreRenderRecursiveInternal() +221
System.Web.UI.Control.PreRenderRecursiveInternal() +221
System.Web.UI.Control.PreRenderRecursiveInternal() +221
System.Web.UI.Control.PreRenderRecursiveInternal() +221
System.Web.UI.Control.PreRenderRecursiveInternal() +221
System.Web.UI.Control.PreRenderRecursiveInternal() +221
System.Web.UI.Control.PreRenderRecursiveInternal() +221
System.Web.UI.Control.PreRenderRecursiveInternal() +221
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4296
Zero2Cool
  • Posts: 1082
  • Joined: 26/04/2011
Can you post the contents of your forum.aspx or default.aspx pages that are in the /forum directory?
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