Repository navigation
YAF.NET Integration in to an existing ASP.NET Application
Note
This page is for YAF.NET v3 (.NET Framework 4.8.1, Web Forms). For v4 see Integrate YAF.NET v4 into an existing ASP.NET Core application.
Tip
A complete working example is available as the YAF.NET Sample Application: a standard Visual Studio ASP.NET application with YAF.NET integrated as a control on a page.
-
Create a folder forum in the root of your application and copy all YAF.NET files and folders into it, except:
App_Browsersbin- all
.configfiles
-
Copy the
App_Browsersandbinfolders into the root of your application. -
Merge the YAF.NET
.configfiles into the ones in your application root:-
web.config: merge the
recommended.web.configinto your existingweb.config. -
appSettings: set YAF.FileRoot and YAF.AppRoot to the forum folder. The rest is done by the installation wizard when you open the forum for the first time.
<add key="YAF.FileRoot" value="~/forum" /> <add key="YAF.AppRoot" value="~/forum" />
-
-
To show the forum inside your own page (e.g. with your master page), create a page in the
forumfolder. Register the YAF.NET controls at the top:<%@ Register TagPrefix="YAF" Namespace="YAF.Web.Controls" Assembly="YAF.Web" %>and add the forum control where the forum should appear:
<YAF:Forum runat="server" ID="forum" BoardID="1" />
Otherwise you can use the existing
default.aspxin theforumfolder. -
Open the page you created, e.g.
https://www.yourwebsite.com/forum/forumtest.aspx, orhttps://www.yourwebsite.com/forum/. Follow the steps of the installation wizard, which connects to your database and sets up the forum.
YetAnotherForum.NET (YAF) the Open Source Discussion Forum for ASP.NET - https://YetAnotherForum.NET - Support me on Ko-fi
Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
Getting started
- About YAF.NET
- Features
- Docker
- Installation (IIS)
- Hosting on Linux with nginx
- Integration (ASP.NET Core)
- Update v4 to a newer v4
- Upgrade from v3 to v4
Configuration
Administration
Help
Development
Legacy (v3 and older)