YAFLogo

bh0526
  • bh0526
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
9 years ago
Hi,

I just downloaded YAF yesterday. I opened the web site in VS 2013 and it looks like everything works perfectly. But I was looking for documentation about the product. Here are my questions:

1. I have an existing ASP.Net web site that works great. I want to add a new menu item on my master page for Forums. When Forums is clicked, I want to call the YAF web site. Not sure how to do this. Up till now, all my web sites were standalone sites and not accessing other sites.

2. Is there some documentation of the SQL database?

3. This is probably related to question #2 as it's probably database-driven, but how do I tailor YAF for my specific forum topics?

Thanks,

Bob

Sponsor
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
9 years ago

Hi,

I just downloaded YAF yesterday. I opened the web site in VS 2013 and it looks like everything works perfectly. But I was looking for documentation about the product. Here are my questions:

1. I have an existing ASP.Net web site that works great. I want to add a new menu item on my master page for Forums. When Forums is clicked, I want to call the YAF web site. Not sure how to do this. Up till now, all my web sites were standalone sites and not accessing other sites.

2. Is there some documentation of the SQL database?

3. This is probably related to question #2 as it's probably database-driven, but how do I tailor YAF for my specific forum topics?

Thanks,

Bob

Originally Posted by: bh0526 

https://github.com/YAFNET/YAFNET/wiki 

1- What has been done is you put all of YAF's files (minus the BIN directory) into a directory called "forum"... then in your site.master you add a link to yourdomain.com/forum ... you will have to edit the default.aspx page to include your specific asp.net project... for example, my default.aspx page code is below, this is in my /forum directory.

<%@ Page Title="Forum" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"  CodeBehind="Forum.aspx.cs" Inherits="PackersHome.Forum" %>
<%@ Register TagPrefix="YAF" Assembly="YAF" Namespace="YAF" %>


<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
   	<br /> <YAF:Forum runat="server" ID="forum" BoardID="1" />
</asp:Content>

2- I don't have an answer for this

3- sorry, i don't know what you're asking, could you elaborate and i could try to help

bh0526
  • bh0526
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
9 years ago
Thanks for the reply. I created a folder in my web site project named Folder like you said. I then copied everything but the bin directory to this folder. I changed my master page menu to call Forum/default.aspx. But I get an error when I compile. It's in the web.config file I copied to Folder. The error is:

It is an error to use a section registered as AllowedDefinitions='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. When I click on the error it highlights the forms authentication section:

I never had 2 web.config files in the same project so not sure what to do.

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
9 years ago
To merge the files, I would step through them both using a program called WinMerge.

http://winmerge.org/downloads/ 

Did you create "Folder" or "Forum"? I am not trying to be nit pick, but I think you said you created Folder, but pointed the url to /Forum/...

bh0526
  • bh0526
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
9 years ago
I did create Forum. Sorry, typo on my part. I'll take a look at this winmerge link you sent.

Thanks,

Bob

bh0526
  • bh0526
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
9 years ago
Ok, I used the winmerge tool on the web.config but I get the same error. Any ideas on what I'm doing wrong?

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
9 years ago

Ok, I used the winmerge tool on the web.config but I get the same error. Any ideas on what I'm doing wrong?

Originally Posted by: bh0526 

Did you deleted one web.config? the one in the forum folder?

Check the integration guide for more info...

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

bh0526
  • bh0526
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
9 years ago
I copied the YAF-related parts from the web.config in Forum and pasted in the root web.config. I then deleted the web.config from Forum. But now I get this error when I compile:

The type or namespace 'YAF' could not be found (are you missing a using directive or assembly reference?)

bh0526
  • bh0526
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
9 years ago
Also, if I click the error then it takes me to this line in my web.config:

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
9 years ago
Did you moved the bin folder from the forum folder to the root folder?
bh0526
  • bh0526
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
9 years ago
Ok, I did forget to do this. So I just did it now. I now get an error on this line in IdentityModels.cs:

var identity = manager.CreateIdentity(user, DefaultAuthenticationTypes.ApplicationCookie);

ANd here is the error:

Error 5 'Microsoft.AspNet.Identity.UserManagerExtensions.CreateIdentity()' is not supported by the language C:\Users\XXXXXXX\Documents\Visual Studio 2013\WebSites\DotNetDevelopersFlorida\App_Code\IdentityModels.cs 44 36 DotNetDevelopersFlorida

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
9 years ago

Ok, I did forget to do this. So I just did it now. I now get an error on this line in IdentityModels.cs:

var identity = manager.CreateIdentity(user, DefaultAuthenticationTypes.ApplicationCookie);

ANd here is the error:

Error 5 'Microsoft.AspNet.Identity.UserManagerExtensions.CreateIdentity()' is not supported by the language C:\Users\XXXXXXX\Documents\Visual Studio 2013\WebSites\DotNetDevelopersFlorida\App_Code\IdentityModels.cs 44 36 DotNetDevelopersFlorida

Originally Posted by: bh0526 

I can only guess in that case because i never used the new ASP.NET Identity, but my guess is that that both are not working together (identity whith the old asp.net membership).

There is a possible solution posted here:

http://yetanotherforum.net/forum/posts/m63616-Using-ASP-NET-IDENTITY-OWIN--MVC-5--With-YAF--As-part-of-your-site#post63616