YAFLogo

andulv
  • andulv
  • 50.6% (Neutral)
  • YAF Forumling Topic Starter
16 years ago
I just found a workaround/fix for a problem that has been preventing us for using YAF in a DNN enviroment, and I thought I should share it with other users:

Problem:

When YAF is hosted in a DNN portal other than the main portal, user is suddenly thrown out and has to reauthenticate.

I saw another thread on this forum where the poster described this situation as happening when user tries to edit or reply to a post.

As far as I can tell the problem occurs after showing the "posts" page. No matter what action the user takes, after this page has been displayed, it fails and the user is thrown back to the login page.

Background:

For the "posts" page, the generated HTML document uses /DesktopModules/YetAnotherForumDotNet/resource.ashx to include yaf.js.

This request succeeds, but the user will be have to reauthenticate after the request unless user is a member of default portal. I believe this is due to the request causes DNN authentication to occur, and since neither portalid nor tabid is a part of the querystring authentication is done against default portal.

As far as I can tell from the YAF source, resource.ashx is used heavily to retrieve images. For some reasons this does not cause any authentication problems. It seems like the problem only occurs when retrieving .JS files. Or maybe I have overlooked something?

Workaround:

1. Moved the two .JS files (yaf.js and datapanel.js) into the /js folder of DNN root folder.

2. Changed the GetURLToResource in ForumPage.CS to use this location and compiled a new YAF.DLL.

Sponsor