bh0526
  •  bh0526
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
2014-07-17T13:07:03Z
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
2014-07-17T13:57:45Z
Originally Posted by: bh0526 

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



Documentation - 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
2014-07-17T15:00:19Z
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:

<authentication mode="Forms">
<forms name=".YAFNET_Authentication" protection="All" timeout="43200" cookieless="UseCookies"/>
</authentication>

I never had 2 web.config files in the same project so not sure what to do.
Zero2Cool
2014-07-17T16:01:44Z
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
2014-07-17T16:05:17Z
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
2014-07-17T19:16:56Z
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
2014-07-18T11:34:02Z
Originally Posted by: bh0526 

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



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 
UserPostedImage
bh0526
  •  bh0526
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
2014-07-18T15:03:50Z
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
2014-07-18T15:05:14Z
Also, if I click the error then it takes me to this line in my web.config:

<profile enabled="true" defaultProvider="YafProfileProvider" inherits="YAF.Utils.YafUserProfile">
tha_watcha
2014-07-18T15:21:04Z
Did you moved the bin folder from the forum folder to the root folder?
UserPostedImage
bh0526
  •  bh0526
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
2014-07-18T15:35:59Z
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<TUser,TKey>()' is not supported by the language C:\Users\XXXXXXX\Documents\Visual Studio 2013\WebSites\DotNetDevelopersFlorida\App_Code\IdentityModels.cs 44 36 DotNetDevelopersFlorida
tha_watcha
2014-07-19T10:28:09Z
Originally Posted by: bh0526 

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<TUser,TKey>()' is not supported by the language C:\Users\XXXXXXX\Documents\Visual Studio 2013\WebSites\DotNetDevelopersFlorida\App_Code\IdentityModels.cs 44 36 DotNetDevelopersFlorida



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.n...t-of-your-site#post63616 
UserPostedImage

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