YAFLogo

Lawn Dork
  • Lawn Dork
  • 56.6% (Neutral)
  • YAF Camper Topic Starter
4 years ago
I understand that YAF 3.0 is still under development, but I have an .NET site using OWIN authentication and I want to have a single global login for the site / forum. YAF 3.0 seemed to be the only solution for that.

I managed to download the source from github and fumble through getting the /install/default.aspx completed for the forum, which I installed under the /forum/ directory of my application.

Now when trying to retrieve /forum/default.aspx, I get the following error:

 2020-07-30 20_23_59-Window.png You have insufficient rights to see the content.

this.page is returning null, and additionally, pages only contains 5 pages:

 2020-07-30 20_25_17-Window.png You have insufficient rights to see the content.

At this point I'm stuck and don't know how to proceed...

Edit: I should note that I was able to run 3.0 in its own solution / environment and managed to get it functioning. I had to make a few changes here and there to get it working in my application where I could complete the GUI install/default.aspx through the end. Database tables, etc. installed fine. I'm at the point where I want to use the forum and get the main page.

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
4 years ago
Did you run the forum in the directory forum as it own application, or as one application with your main website app?

I assume you want to run it as integrated solution?

In that case you need to setup the app settings correctly

 <add key="YAF.FileRoot" value="~/forum" />
 <add key="YAF.AppRoot" value="~/forum" />
Lawn Dork
  • Lawn Dork
  • 56.6% (Neutral)
  • YAF Camper Topic Starter
4 years ago
Thanks for the reply. I am running it as one application with all of your source files in my main application. That would be the only way I could have a universal login for the site, or is there another way?

Regardless, I have two settings already in the app.config file.

<appSettings>
  <add key="YAF.GDPRControllerAddress" value="" />
  <add key="YAF.BoardID" value="1" />
  <add key="YAF.EnableURLRewriting" value="true" />
  <add key="YAF.URLRewritingMode" value="Translit" />
  <add key="YAF.UseSMTPSSL" value="false" />
  <add key="YAF.DatabaseObjectQualifier" value="yaf_" />
  <add key="YAF.DatabaseOwner" value="dbo" />
  <add key="YAF.AppRoot" value="~/forum" />
  <add key="YAF.FileRoot" value="~/forum" />
  <add key="YAF.MobileUserAgents" value="iphone,ipad,midp,windows ce,windows phone,android,blackberry,opera mini,mobile,palm,portable,webos,htc,armv,lg/u,elaine,nokia,playstation,symbian,sonyericsson,mmp,hd_mini" />
  <add key="YAF.ConfigPassword" value="password" />
  <add key="YAF.ConnectionStringName" value="DefaultConnection" />
</appSettings>

I was able to follow your version 2 instructions for integration here  and that got it mostly working. First, the main thing that gave me trouble was the App_GlobalResources. I had to make sure they were Embedded Resources and also found no way to compile without changing the namespace "YAF.App_GlobalResources" to be under my main app's namespace "LD.forum.App_GlobalResources".

Secondly, I had to modify the UrlRewriter.config as such:

<rewriter>
  <!-- Advanced URL Rewriting Format -->
  <rewrite url="^~/forum/(.+?)?info?\?i=([0-9]+?)&amp;url\=(.+)$" to="~/forum/$1Default.aspx?g=info&amp;i=$2&amp;url=$3" processing="stop" />
  <rewrite url="^~/forum/(.+)?topics/([0-9]+)-((.+))?(/page([0-9]+))(\?(.+))?$" to="~/forum/$1Default.aspx?g=topics&amp;f=$2&amp;p=$6&amp;$7" processing="stop" />
  <rewrite url="^~/forum/(.+)?topics/([0-9]+)-((.+))?(\?(.+))?$" to="~/forum/$1Default.aspx?g=topics&amp;f=$2&amp;$6" processing="stop" />
  <rewrite url="^~/forum/(.+)?category/([0-9]+)-((.+))?(\?(.+))?$" to="~/forum/$1Default.aspx?g=forum&amp;c=$2&amp;$6" processing="stop" />
  <rewrite url="^~/forum/(.+)?posts/t([0-9]+)findlastpost-((.+))?(\?(.+))?$" to="~/forum/$1Default.aspx?g=posts&amp;t=$2&amp;find=lastpost&amp;$7" processing="stop" />
  <rewrite url="^~/forum/(.+)?posts/t([0-9]+)findunread-((.+))?(\?(.+))?$" to="~/forum/$1Default.aspx?g=posts&amp;t=$2&amp;find=unread&amp;$7" processing="stop" />
  <rewrite url="^~/forum/(.+)?posts/t([0-9]+)-((.+))?(/page([0-9]+))(\?(.+))?$" to="~/forum/$1Default.aspx?g=posts&amp;t=$2&amp;p=$6&amp;$8" processing="stop" />
  <rewrite url="^~/forum/(.+)?posts/t([0-9]+)-((.+))?(\?(.+))?$" to="~/forum/$1Default.aspx?g=posts&amp;t=$2&amp;$6" processing="stop" />
  <rewrite url="^~/forum/(.+)?posts/m([0-9]+)findlastpost-((.+))?(\?(.+))?$" to="~/forum/$1Default.aspx?g=posts&amp;m=$2&amp;find=lastpost&amp;$7" processing="stop" />
  <rewrite url="^~/forum/(.+)?posts/m([0-9]+)findunread-((.+))?(\?(.+))?$" to="~/forum/$1Default.aspx?g=posts&amp;m=$2&amp;find=unread&amp;$7" processing="stop" />
  <rewrite url="^~/forum/(.+)?posts/m([0-9]+)-((.+))?(\?(.+))?$" to="~/forum/$1Default.aspx?g=posts&amp;m=$2&amp;$6" processing="stop" />
  <rewrite url="^~/forum/(.+)?userprofile/([0-9]+)-((.+))?$" to="~/forum/$1Default.aspx?g=userprofile&amp;u=$2&amp;$6" processing="stop" />
  <rewrite url="^~/forum/(.+)?admin/([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)?/([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)?(\?(.+))?$" to="~/forum/$1Default.aspx?g=admin_$2_$3&amp;$5" processing="stop" />
  <rewrite url="^~/forum/(.+)?admin/([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)?(\?(.+))?$" to="~/forum/$1Default.aspx?g=admin_$2&amp;$4" processing="stop" />
  <rewrite url="^~/forum/(.+)?moderate/([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)?/([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)?(\?(.+))?$" to="~/forum/$1Default.aspx?g=moderate_$2_$3&amp;$5" processing="stop" />
  <rewrite url="^~/forum/(.+)?moderate/([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)?(\?(.+))?$" to="~/forum/$1Default.aspx?g=moderate_$2&amp;$4" processing="stop" />
  <rewrite url="^~/forum/(.+)?profile/([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)?/([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)?(\?(.+))?$" to="~/forum/$1Default.aspx?g=profile_$2_$3&amp;$5" processing="stop" />
  <rewrite url="^~/forum/(.+)?profile/([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)?(\?(.+))?$" to="~/forum/$1Default.aspx?g=profile_$2&amp;$4" processing="stop" />
  <rewrite url="^~/forum/(.+)?account/([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)?/([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)?(\?(.+))?$" to="~/forum/$1Default.aspx?g=account_$2_$3&amp;$5" processing="stop" />
  <rewrite url="^~/forum/(.+)?account/([\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}-]+)?(\?(.+))?$" to="~/forum/$1Default.aspx?g=account_$2&amp;$4" processing="stop" />
  <rewrite url="^~/forum/(.+)?rsstopic/type([0-9]+)feed([0-9]+)f([0-9]+)-((.+))?$" to="~/forum/$1Default.aspx?g=rsstopic&amp;type=$2&amp;feed=$3&amp;f=$4" processing="stop" />
  <rewrite url="^~/forum/(.+)?rsstopic/type([0-9]+)feed([0-9]+)t([0-9]+)-((.+))?$" to="~/forum/$1Default.aspx?g=rsstopic&amp;type=$2&amp;feed=$3&amp;t=$4" processing="stop" />
  <rewrite url="^~/forum/(.+)?rsstopic/type([0-9]+)feed([0-9]+)-((.+))?$" to="~/forum/$1Default.aspx?g=rsstopic&amp;type=$2&amp;feed=$3" processing="stop" />
  <if url="^((?!signin-|sitemap\.xml|\.ashx|\.asmx|\.axd|\.gif|\.png|\.jpg|\.ico|\.svg|\.ttf|\.woff|\.woff2|\.pdf|\.css|\.js|\/install|error\.aspx|default\.aspx|digest\.aspx|ckfinder|api).)*$">
    <rewrite url="^~/forum/(.+)?\?(.+)?$" to="~/forum/Default.aspx?g=$1&amp;$2" processing="stop" />
    <rewrite url="^~/forum/(.+)?\.aspx$" to="~/forum/Default.aspx?g=$1" processing="stop" /> 
    <rewrite url="^~/forum/(.+)?$" to="~/forum/Default.aspx?g=$1" processing="stop" />
  </if>
</rewriter>

Only then was I able to compile and complete the forum/install/default.aspx. Now the problem is getting to the root of the forum at /forum/default.aspx.

Side note, I did successfully get 2.3.7 to work completely in my application before realizing version 3 was what I needed to have a universal login.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
4 years ago
Atleast with the update YAF.SampleApplication i cannot reproduce the issue. Are you using the latest commit of the master branch(1e73bcc6f5a7a9fcd0b4b16dc8d26dd165040e2c) ?
Lawn Dork
  • Lawn Dork
  • 56.6% (Neutral)
  • YAF Camper Topic Starter
4 years ago
That's the one I'm using, yes. Would it make a difference that my site is ASP.NET MVC? I don't think it should.

I'm going to try to take the YetAnotherForum.NET solution from that commit (1e73bcc6f5a7a9fcd0b4b16dc8d26dd165040e2c) and see if I can get it working under the /forum/ directory in it's own application.

Lawn Dork
  • Lawn Dork
  • 56.6% (Neutral)
  • YAF Camper Topic Starter
4 years ago
When is 3.0 set on being released? I'm adamant on having my site login integrated with my forum login. YAF is honestly brilliant for anyone who has a .NET site and a very robust and comprehensive forum, and I've started to really like it more from communicating on here.

I did get an environment where I had it working under the /forum/ directory but in a standalone YAF environment. I beat it up too much when trying to integrate it, so now I can't get the standalone to work. For some reason, ckeditor js is now giving an error when making a new post for the Message box when I had a functioning standalone forum under the /forum/ directory before. Not sure where to go from here. I have a full-time job and my site is my side passion, and I gave myself another 2 weeks to integrate a forum into the site. If you have any suggestions, I'm all ears. I've put about 30 hours in the last 4 days into this.

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

When is 3.0 set on being released?

Originally Posted by: Lawn Dork 

It will take a wile. But it will be released after Bootstrap 5 is released, which will be out by the end of the year.

Lawn Dork
  • Lawn Dork
  • 56.6% (Neutral)
  • YAF Camper Topic Starter
4 years ago
I got past this error by changing:

 2020-08-03 14_20_49-LD (Debugging) - Microsoft Visual Studio.png You have insufficient rights to see the content.

Now I'm consistently getting null for this.page in Forum.cs when trying to load /forum/default.aspx. Any suggestions?

 2020-08-03 14_19_27-LD (Debugging) - Microsoft Visual Studio.png You have insufficient rights to see the content.

I should note my application is a MVC application. I was able to make sure the .aspx pages get handled like web forms pages.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
4 years ago
If the same code works as standalone. i would assume the mvc solution is the problem. But without seeing the project i cant help much, if i cant reproduce the problem
Lawn Dork
  • Lawn Dork
  • 56.6% (Neutral)
  • YAF Camper Topic Starter
4 years ago
You're right, I think something with my Global.asax file on Application_Start. Some needed startup code must not be running.

Is it possible we can do a remote session and you can look at how I've set it up in my project? I don't want to keep making modifications to the source when it is probably something simple that you can see.

I really think once it is running, I can replace my OWIN setup with the YAF OWIN setup and have a universal site login.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
4 years ago
Would be possible to send me the files?

It looks like the URL parameters are not correctly parsed.

Did you exclude all aspx pages from the web routing that is used for mvc?

Lawn Dork
  • Lawn Dork
  • 56.6% (Neutral)
  • YAF Camper Topic Starter
4 years ago
Sent you a PM. I'm excluding the aspx and ashx from the MVC routing in Route.Config with:


routes.IgnoreRoute("{*allaspx}", new { allaspx = @".*\.aspx(/.*)?" });
routes.IgnoreRoute("{*allashx}", new { allashx = @".*\.ashx(/.*)?" });
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
4 years ago
I got the message, I look in to it on the weekend