YAFLogo

CandiceS
  • CandiceS
  • 69.8% (Friendly)
  • YAF Lover Topic Starter
10 years ago
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
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
10 years ago
What kind of application are you trying to incorporate YAF into?

What have you tried?

What errors have you encountered?

CandiceS
  • CandiceS
  • 69.8% (Friendly)
  • YAF Lover Topic Starter
10 years ago
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
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago

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.

Originally Posted by: CandiceS 

The quick guide might help

https://github.com/YAFNET/YAFNET/wiki/YAF.NET-Integration-in-to-an-existing-ASP.NET-Application 

CandiceS
  • CandiceS
  • 69.8% (Friendly)
  • YAF Lover Topic Starter
10 years ago
Thanks, would I use the YAF.SampleWebApplication for the manual part, or must this be the install version of YAF.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago

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

Originally Posted by: CandiceS 

No use the regular install version.

CandiceS
  • CandiceS
  • 69.8% (Friendly)
  • YAF Lover Topic Starter
10 years ago
Thank you, will give it a try
CandiceS
  • CandiceS
  • 69.8% (Friendly)
  • YAF Lover Topic Starter
10 years ago
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
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago

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.

Originally Posted by: CandiceS 

What errors did you get?

CandiceS
  • CandiceS
  • 69.8% (Friendly)
  • YAF Lover Topic Starter
10 years ago
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
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
10 years ago
Do you have this published online yet? If so, can you share the URL?
CandiceS
  • CandiceS
  • 69.8% (Friendly)
  • YAF Lover Topic Starter
10 years ago
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
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
10 years ago
Try clicking a users profile on this very site. I think you are getting the same error and this is a bug perhaps?

CandiceS
  • CandiceS
  • 69.8% (Friendly)
  • YAF Lover Topic Starter
10 years ago
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
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
10 years ago
Can you post the contents of your forum.aspx or default.aspx pages that are in the /forum directory?